mirror of
https://github.com/status-im/react-native.git
synced 2025-02-22 14:18:23 +00:00
Summary: DynamicFromMap internally uses SimplePool object to recycle dynamic prop objects. But the pool is not multi-thread safe. Currently the most used dynamic props are size props such as left, paddingVertical, marginTop and so on. These props are only accessed from the layout thread so the pool works fine. If a dynamic prop is needed in UI thread, then the two threads can access the same pool object and cause random errors. This PR make the pool object thread local to avoid synchronization. After this change there are two pool objects created in the process. Tested in official Airbnb app after updating accessibilityComponentType to be dynamic. Once this is merged, I'll send another PR to support "disabled" state in `accessibilityComponentType`. [ANDROID] [BUGFIX] [DynamicFromMap] - Fix a crash caused by dynamic props. Pull Request resolved: https://github.com/facebook/react-native/pull/17842 Differential Revision: D10374238 Pulled By: hramos fbshipit-source-id: 7ebf89c5abf06bd5fb43b205348ba4dc7e19517d
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.