fix crash in ReactGroupView when subview clipping is enabled#42811
Closed
sammy-SC wants to merge 2 commits into
Closed
fix crash in ReactGroupView when subview clipping is enabled#42811sammy-SC wants to merge 2 commits into
sammy-SC wants to merge 2 commits into
Conversation
Summary: changelog: [internal] Outdated comment, let's remove it. Reviewed By: fabriziocucci Differential Revision: D53348035
Summary: changelog: [internal] Attempt to fixing a crash in ReactViewGroup when removeClippedSubviews is enabled. The implementation of removeClippedSubviews in ReactViewGroup is stateful and must be in sync between children of view and [member variables in ReactViewGroup](https://fburl.com/code/l22wewzc) that keep reference to all children. When it gets out of sync, it manifests itself as `java.lang.IndexOutOfBoundsException` crash. The mounting layer counts on the fact that view hierarchy will never be directly mutated and all mutations will go through [ReactClippingViewManager](https://fburl.com/code/esl3vqhh). ReactClippingViewManager, if clipping is enabled, calls appropriate methods on ReactViewGroup to make sure member variables to manage clipping are in sync with view hierarchy. This is true, except for a retry mechanism in SurfaceMountingManager. The retry mechanism tries to manually reconciliation the state with android view hierarchy. It bypasses ReactClippingViewManager in the process. Reviewed By: javache Differential Revision: D53348831
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D53348831 |
Base commit: 184b295 |
Contributor
|
This pull request has been merged in 4473fe8. |
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:
changelog: [internal]
Attempt to fixing a crash in ReactViewGroup when removeClippedSubviews is enabled.
The implementation of removeClippedSubviews in ReactViewGroup is stateful and must be in sync between children of view and member variables in ReactViewGroup that keep reference to all children. When it gets out of sync, it manifests itself as
java.lang.IndexOutOfBoundsExceptioncrash.The mounting layer counts on the fact that view hierarchy will never be directly mutated and all mutations will go through ReactClippingViewManager. ReactClippingViewManager, if clipping is enabled, calls appropriate methods on ReactViewGroup to make sure member variables to manage clipping are in sync with view hierarchy.
This is true, except for a retry mechanism in SurfaceMountingManager. The retry mechanism tries to manually reconciliation the state with android view hierarchy. It bypasses ReactClippingViewManager in the process.
Reviewed By: javache
Differential Revision: D53348831