Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop requiring TurboModuleManager JSIModule on CatalystInstance cleanup
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
- Loading branch information