mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
42dcfab2a9
Summary: In `CatalystInstanceImpl.destroy()`, we require the TurboModuleManager using the [following lines](https://fburl.com/diffusion/a4y6wbft): ``` final JSIModule turboModuleManager = ReactFeatureFlags.useTurboModules ? mJSIModuleRegistry.getModule(JSIModuleType.TurboModuleManager) : null; ``` For some strange reason, even though `ReactFeatureFlags.useTurboModules` is true, the TurboModuleManager isn't registered with mJSIModuleRegistry. I spent some time looking through the code, but I couldn't figure out why. These lines actually aren't necessary, so it's possible to fix the issue by simply working around it, which is what this diff does. We shouldn't have been double requiring the TurboModuleManager anyways, since `CatalystInstance.java` has a method to set the TurboModuleManager, which we call in `ReactInstanceManager.createReactContext`. ## Alternative approach I could push this diff to the next cut, and instead land a diff that adds debug information to the native crash. At the cost of a week, it may help us figure out why we're seeing the crash. Thoughts? cc fkgozali Reviewed By: fkgozali Differential Revision: D17636604 fbshipit-source-id: ecfff593dc6eb4ec4d5e331348b308bc7ab37966
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.