mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Stop sharing LongLivedObjectCollection with the bridge
Summary: This is the Android analogue to D30019833. Changelog: [Internal] Reviewed By: p-sun Differential Revision: D30029295 fbshipit-source-id: 13df0dfb915697eeedcc527dcdb6c246e89afb0c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
32bfd7a857
commit
034c6dfe34
@@ -28,6 +28,26 @@ 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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user