mirror of
https://github.com/status-im/react-native.git
synced 2025-02-23 22:58:19 +00:00
Summary: This diff changes how we expose UIManager to JavaScript realm and control ownership of it. This change should improve reliability and a thread-safety. UIManagerBinding is a HostObject which consolidate ownership of UIManager. Now JavaScript's GC controls its lifetime which eliminates the possibility of calling some JS facing methods of UIManager using a dangling pointer. Besides that, all API now imply that if the caller has a reference to jsi::Runtime, it calls the method on the proper thread (it's an implication of RuntimeExecutor design). Reviewed By: sahrens Differential Revision: D12876745 fbshipit-source-id: eb8c70317460df5b14e45031ad15fc6c8e5b5ce3