mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Create gating to route all TurboModules through interop (#37153)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/37153 Changelog: [Internal] Reviewed By: philIip Differential Revision: D45329538 fbshipit-source-id: b79ef27544695dfc1cd6c25622c1971e151863d2
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2a8e1e0137
commit
1395ed29ae
@@ -60,6 +60,10 @@ RCT_EXTERN void RCTDisableTurboModuleManagerDelegateLocking(BOOL enabled);
|
||||
RCT_EXTERN BOOL RCTTurboModuleInteropEnabled(void);
|
||||
RCT_EXTERN void RCTEnableTurboModuleInterop(BOOL enabled);
|
||||
|
||||
// Route all TurboModules through TurboModule interop
|
||||
RCT_EXTERN BOOL RCTTurboModuleInteropForAllTurboModulesEnabled(void);
|
||||
RCT_EXTERN void RCTEnableTurboModuleInteropForAllTurboModules(BOOL enabled);
|
||||
|
||||
typedef enum {
|
||||
kRCTGlobalScope,
|
||||
kRCTGlobalScopeUsingRetainJSCallback,
|
||||
|
||||
@@ -130,6 +130,16 @@ void RCTEnableTurboModuleInterop(BOOL enabled)
|
||||
turboModuleInteropEnabled = enabled;
|
||||
}
|
||||
|
||||
static BOOL useTurboModuleInteropForAllTurboModules = NO;
|
||||
BOOL RCTTurboModuleInteropForAllTurboModulesEnabled(void)
|
||||
{
|
||||
return useTurboModuleInteropForAllTurboModules;
|
||||
}
|
||||
void RCTEnableTurboModuleInteropForAllTurboModules(BOOL enabled)
|
||||
{
|
||||
useTurboModuleInteropForAllTurboModules = enabled;
|
||||
}
|
||||
|
||||
@interface RCTBridge () <RCTReloadListener>
|
||||
@end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user