Skip to content

Commit

Permalink
clean up RCTTurboModuleInteropForAllTurboModulesEnabled (#47148)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #47148

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.

Reviewed By: realsoelynn

Differential Revision: D64718453

fbshipit-source-id: 8bc6c1943a231389c74fd0114dfb7c54dd6c8614
  • Loading branch information
philIip authored and facebook-github-bot committed Oct 23, 2024
1 parent 15eadbe commit 538bff7
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 538bff7

Please sign in to comment.