Skip to content

Commit

Permalink
clean up RCTTurboModuleInteropForAllTurboModulesEnabled
Browse files Browse the repository at this point in the history
Summary:
Changelog: [iOS][Breaking]

This param was used to validate that the TurboModule interop layer could handle scale. Let's clean it up.

the only callsites are in forks: https://github.com/search?q=RCTEnableTurboModuleInteropForAllTurboModules&type=code&p=3, so this should be safe to delete.

Differential Revision: D64718453
  • Loading branch information
philIip authored and facebook-github-bot committed Oct 21, 2024
1 parent 1aaedc7 commit 46a0a4d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
10 changes: 0 additions & 10 deletions packages/react-native/React/Base/RCTBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,6 @@ void RCTSetTurboModuleInteropBridgeProxyLogLevel(RCTBridgeProxyLoggingLevel logL
bridgeProxyLoggingLevel = logLevel;
}

static BOOL useTurboModuleInteropForAllTurboModules = NO;
BOOL RCTTurboModuleInteropForAllTurboModulesEnabled(void)
{
return useTurboModuleInteropForAllTurboModules;
}
void RCTEnableTurboModuleInteropForAllTurboModules(BOOL enabled)
{
useTurboModuleInteropForAllTurboModules = enabled;
}

// Turn on TurboModule sync execution of void methods
static BOOL gTurboModuleEnableSyncVoidMethods = NO;
BOOL RCTTurboModuleSyncVoidMethodsEnabled(void)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,30 +475,18 @@ - (instancetype)initWithBridgeProxy:(RCTBridgeProxy *)bridgeProxy

- (BOOL)_isTurboModule:(const char *)moduleName
{
if (RCTTurboModuleInteropForAllTurboModulesEnabled()) {
return NO;
}

Class moduleClass = [self _getModuleClassFromName:moduleName];
return moduleClass != nil && (isTurboModuleClass(moduleClass) && ![moduleClass isSubclassOfClass:RCTCxxModule.class]);
}

- (BOOL)_isLegacyModule:(const char *)moduleName
{
if (RCTTurboModuleInteropForAllTurboModulesEnabled()) {
return YES;
}

Class moduleClass = [self _getModuleClassFromName:moduleName];
return [self _isLegacyModuleClass:moduleClass];
}

- (BOOL)_isLegacyModuleClass:(Class)moduleClass
{
if (RCTTurboModuleInteropForAllTurboModulesEnabled()) {
return YES;
}

return moduleClass != nil && (!isTurboModuleClass(moduleClass) || [moduleClass isSubclassOfClass:RCTCxxModule.class]);
}

Expand Down

0 comments on commit 46a0a4d

Please sign in to comment.