From b2b064d5930b20020ef4aaa503da58b9d0b8d63a Mon Sep 17 00:00:00 2001 From: David Vacca Date: Fri, 22 Sep 2023 21:28:01 -0700 Subject: [PATCH] Remove mTurboModuleManagerJSIModule from CatalystInstanceImpl Summary: I'm removing mTurboModuleManagerJSIModule from CatalystInstanceImpl, as this is a duplicated variable. changelog: [internal] internal Differential Revision: D49483637 fbshipit-source-id: d8cdc4c60459f1d351505c2a1716039c17161059 --- .../com/facebook/react/bridge/CatalystInstanceImpl.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstanceImpl.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstanceImpl.java index b78f11756fe68d..8803b1983d98d8 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstanceImpl.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstanceImpl.java @@ -103,7 +103,6 @@ public String toString() { private JavaScriptContextHolder mJavaScriptContextHolder; private volatile @Nullable TurboModuleRegistry mTurboModuleRegistry = null; - private @Nullable JSIModule mTurboModuleManagerJSIModule = null; // C++ parts private final HybridData mHybridData; @@ -369,8 +368,8 @@ public void run() { @Override public void run() { // We need to destroy the TurboModuleManager on the JS Thread - if (mTurboModuleManagerJSIModule != null) { - mTurboModuleManagerJSIModule.invalidate(); + if (mTurboModuleRegistry != null) { + mTurboModuleRegistry.invalidate(); } getReactQueueConfiguration() @@ -586,7 +585,6 @@ public void run() { public void setTurboModuleManager(JSIModule module) { mTurboModuleRegistry = (TurboModuleRegistry) module; - mTurboModuleManagerJSIModule = module; } private void decrementPendingJSCalls() {