mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
88e03fa4db
Summary: When you create a TurboModule from the JS side, we instantiate its Java class and simply make this `javaobject` a `jni::global_ref` in C++. But the reason why we need to make this a global ref is because `JavaTurboModule` needs it to be a global reference for method calls. Making this a `jni::global_ref` from the perspective to TurboModuleManager doesn't really make any sense. So, this diff refactors that bit of code. Reviewed By: mdvacca Differential Revision: D16555673 fbshipit-source-id: 2778fc5a372c41847e8296c2e22bb9a8826fcc52