mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Temporarily add logs in TM initialization
Summary: Marketplace eagerly initializes a few NativeModules. These NativeModules are TurboModule compatible, and the device/user is in the TurboModule test. So these NativeModuels should be returned from the TurboModule system. However, for some reason, we end up doing a lookup on the `NativeModuleRegistry` for these NativeModules. This means that either: 1. The TurboModuleManager isn't attached to the CatalystInstance 2. The TurboModuleManager returned null from getModule. These logs will help us get to the bottom of what's going on. Changelog: [Internal] Reviewed By: JoshuaGross Differential Revision: D20260150 fbshipit-source-id: bb554ead412ad3b0fa7502b77f575365608ebc98
This commit is contained in:
committed by
Facebook Github Bot
parent
3a9fc7cbcf
commit
7ec9af0fcf
@@ -1239,14 +1239,33 @@ public class ReactInstanceManager {
|
||||
|
||||
reactContext.initializeWithInstance(catalystInstance);
|
||||
|
||||
// TODO(T46487253): Remove after task is closed
|
||||
FLog.e(
|
||||
ReactConstants.TAG,
|
||||
"ReactInstanceManager.createReactContext: mJSIModulePackage "
|
||||
+ (mJSIModulePackage != null ? "not null" : "null"));
|
||||
|
||||
if (mJSIModulePackage != null) {
|
||||
catalystInstance.addJSIModules(
|
||||
mJSIModulePackage.getJSIModules(
|
||||
reactContext, catalystInstance.getJavaScriptContextHolder()));
|
||||
|
||||
// TODO(T46487253): Remove after task is closed
|
||||
FLog.e(
|
||||
ReactConstants.TAG,
|
||||
"ReactInstanceManager.createReactContext: ReactFeatureFlags.useTurboModules == "
|
||||
+ (ReactFeatureFlags.useTurboModules == false ? "false" : "true"));
|
||||
|
||||
if (ReactFeatureFlags.useTurboModules) {
|
||||
JSIModule turboModuleManager =
|
||||
catalystInstance.getJSIModule(JSIModuleType.TurboModuleManager);
|
||||
|
||||
// TODO(T46487253): Remove after task is closed
|
||||
FLog.e(
|
||||
ReactConstants.TAG,
|
||||
"ReactInstanceManager.createReactContext: TurboModuleManager "
|
||||
+ (turboModuleManager == null ? "not created" : "created"));
|
||||
|
||||
catalystInstance.setTurboModuleManager(turboModuleManager);
|
||||
|
||||
TurboModuleRegistry registry = (TurboModuleRegistry) turboModuleManager;
|
||||
|
||||
Reference in New Issue
Block a user