mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove JavaTurboModule experiments with retaining JS callbacks in custom scopes
Summary: Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D41551087 fbshipit-source-id: 5bdcd5f8c9bac99603f6187a9bc387827f5321c7
This commit is contained in:
1 parent
dccb57fb50
commit
cadf850ac1
6 files changed
+22
-108
No files matched your search
@@ -55,26 +55,6 @@ public class ReactFeatureFlags {
|
||||
/** Should we dispatch TurboModule methods with promise returns to the NativeModules thread? */
|
||||
public static volatile boolean enableTurboModulePromiseAsyncDispatch = false;
|
||||
|
||||
/**
|
||||
* Experiment:
|
||||
*
|
||||
* <p>Bridge and Bridgeless mode can run concurrently. This means that there can be two
|
||||
* TurboModule systems alive at the same time.
|
||||
*
|
||||
* <p>The TurboModule system stores all JS callbacks in a global LongLivedObjectCollection. This
|
||||
* collection is cleared when the JS VM is torn down. Implication: Tearing down the bridge JSVM
|
||||
* invalidates the bridgeless JSVM's callbacks, and vice versa.
|
||||
*
|
||||
* <p>useGlobalCallbackCleanupScopeUsingRetainJSCallback => Use a retainJSCallbacks lambda to
|
||||
* store jsi::Functions into the global LongLivedObjectCollection
|
||||
*
|
||||
* <p>useTurboModuleManagerCallbackCleanupScope => Use a retainJSCallbacks labmda to store
|
||||
* jsi::Functions into a LongLivedObjectCollection owned by the TurboModuleManager
|
||||
*/
|
||||
public static boolean useGlobalCallbackCleanupScopeUsingRetainJSCallback = false;
|
||||
|
||||
public static boolean useTurboModuleManagerCallbackCleanupScope = false;
|
||||
|
||||
/** This feature flag enables logs for Fabric */
|
||||
public static boolean enableFabricLogs = false;
|
||||
|
||||
|
||||
+2
-7
@@ -16,7 +16,6 @@ import com.facebook.proguard.annotations.DoNotStrip;
|
||||
import com.facebook.react.bridge.CxxModuleWrapper;
|
||||
import com.facebook.react.bridge.JSIModule;
|
||||
import com.facebook.react.bridge.RuntimeExecutor;
|
||||
import com.facebook.react.config.ReactFeatureFlags;
|
||||
import com.facebook.react.turbomodule.core.interfaces.CallInvokerHolder;
|
||||
import com.facebook.react.turbomodule.core.interfaces.TurboModule;
|
||||
import com.facebook.react.turbomodule.core.interfaces.TurboModuleRegistry;
|
||||
@@ -59,9 +58,7 @@ public class TurboModuleManager implements JSIModule, TurboModuleRegistry {
|
||||
runtimeExecutor,
|
||||
(CallInvokerHolderImpl) jsCallInvokerHolder,
|
||||
(CallInvokerHolderImpl) nativeCallInvokerHolder,
|
||||
delegate,
|
||||
ReactFeatureFlags.useGlobalCallbackCleanupScopeUsingRetainJSCallback,
|
||||
ReactFeatureFlags.useTurboModuleManagerCallbackCleanupScope);
|
||||
delegate);
|
||||
installJSIBindings();
|
||||
|
||||
mEagerInitModuleNames =
|
||||
@@ -293,9 +290,7 @@ public class TurboModuleManager implements JSIModule, TurboModuleRegistry {
|
||||
RuntimeExecutor runtimeExecutor,
|
||||
CallInvokerHolderImpl jsCallInvokerHolder,
|
||||
CallInvokerHolderImpl nativeCallInvokerHolder,
|
||||
TurboModuleManagerDelegate tmmDelegate,
|
||||
boolean useGlobalCallbackCleanupScopeUsingRetainJSCallback,
|
||||
boolean useTurboModuleManagerCallbackCleanupScope);
|
||||
TurboModuleManagerDelegate tmmDelegate);
|
||||
|
||||
private native void installJSIBindings();
|
||||
|
||||
|
||||
Reference in new issue
Block a user