Fix ReactSurfaceView-backed roots not reporting the end of pending transactions correctly#46676
Closed
javache wants to merge 2 commits into
Closed
Fix ReactSurfaceView-backed roots not reporting the end of pending transactions correctly#46676javache wants to merge 2 commits into
javache wants to merge 2 commits into
Conversation
Differential Revision: D63463521
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D63466672 |
…ansactions correctly (facebook#46676) Summary: Pull Request resolved: facebook#46676 Changelog: [internal] ## Context We recently "fixed" a problem in `MountingCoordinator` on Android where it would report that it doesn't have any pending transactions when, in fact, it does. The fix introduces a new method in that class to delay marking transactions as done until a mount hook is invoked for that surface. That fixed the issue... by always reporting that there were pending transactions accidentally. The reason for this bug is that the mount hook doesn't have access to the mounting coordinator of the surface if the surface is registered through some of the methods in `Binding.cpp` that don't add the surface to a registry. In that case, we can never mark the transactions as done and the mounting coordinator for those surfaces always report pending transactions incorrectly. NOTE: this bug only affects apps that have the `fixMountingCoordinatorReportedPendingTransactionsOnAndroid` feature flag enabled. ## Changes This fixes the issue by making sure that surfaces are always registered in the registry and that we can access their mounting coordinators in the mount hook to report the transactions as done. Reviewed By: rubennorte Differential Revision: D63466672
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D63466672 |
ce72f50 to
917ec9d
Compare
Contributor
|
This pull request has been merged in 3fbf5c7. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Context
We recently "fixed" a problem in
MountingCoordinatoron Android where it would report that it doesn't have any pending transactions when, in fact, it does. The fix introduces a new method in that class to delay marking transactions as done until a mount hook is invoked for that surface.That fixed the issue... by always reporting that there were pending transactions accidentally.
The reason for this bug is that the mount hook doesn't have access to the mounting coordinator of the surface if the surface is registered through some of the methods in
Binding.cppthat don't add the surface to a registry. In that case, we can never mark the transactions as done and the mounting coordinator for those surfaces always report pending transactions incorrectly.NOTE: this bug only affects apps that have the
fixMountingCoordinatorReportedPendingTransactionsOnAndroidfeature flag enabled.Changes
This fixes the issue by making sure that surfaces are always registered in the registry and that we can access their mounting coordinators in the mount hook to report the transactions as done.
Differential Revision: D63466672