mirror of
https://github.com/status-im/react-native.git
synced 2025-01-16 20:44:10 +00:00
0b560d3d3d
Summary: We keep a list of FlatShadowNodes that mount to Views that we want to delete, and only flush it at the end of an update cycle. This results in a situation where a root view is being removed before children are removed, which results in a crash in NativeViewHierarchyManager because a View that we are trying to remove no longer exists. There are a few approaches to fix the issue: a) make a check if a View exists before removing it. While works, it removes a bug protection when we erroneously trying to remove a View that no longer exists (such as this). I'd prefer to keep the check in place b) flush the views-to-drop queue. This works, but does some extra work in UI thread (namely, removing Views that would be removed anyway) c) trim the views-to-drop queue to remove any Views that will be removed anyway. This does a tiny bit of extra work in BG thread, but less work in UI thread. This diff implements option c). Reviewed By: ahmedre Differential Revision: D2990105
Building React Native for Android
See the docs on the website.
Running tests
When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.