Please sign in to comment.
Protect against JS module call race condition while initializing reac…
…t instance Summary: Fixes a race condition where JS module functions could be called in between ##initializeWithInstance(catalystInstance);## and ##CatalystInstance#runJSBundle##, before the BatchedBridge in JS was set up. We now guarantee that all JS module methods that are called after `ReactContext#hasActiveCatalystInstance()` returns true will have the batched bridge created and ready to use. Reviewed By: lexs Differential Revision: D3258651 fb-gh-sync-id: 66e66533cc86d185e7c865376d6a5cdc6520d2d4 fbshipit-source-id: 66e66533cc86d185e7c865376d6a5cdc6520d2d4
- Loading branch information...
Showing with 71 additions and 39 deletions.
- +17 −3 ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactTestHelper.java
- +34 −11 ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManagerImpl.java
- +14 −23 ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstanceImpl.java
- +6 −2 ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java