Skip to content

Commit 0a5d6c5

Browse files
RSNarafacebook-github-bot
authored andcommitted
c++: Simplify module lookup
Summary: All these flags were introduced for rollout purposes. We no longer need them. Let's get rid of them Changelog: [Internal] Reviewed By: christophpurrer Differential Revision: D85171189
1 parent 1a02e8b commit 0a5d6c5

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

packages/react-native/Libraries/TurboModule/TurboModuleRegistry.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,9 @@ function requireModule<T: TurboModule>(name: string): ?T {
2424
}
2525
}
2626

27-
if (
28-
global.RN$Bridgeless !== true ||
29-
global.RN$TurboInterop === true ||
30-
global.RN$UnifiedNativeModuleProxy === true
31-
) {
32-
const legacyModule: ?T = NativeModules[name];
33-
if (legacyModule != null) {
34-
return legacyModule;
35-
}
27+
const legacyModule: ?T = NativeModules[name];
28+
if (legacyModule != null) {
29+
return legacyModule;
3630
}
3731

3832
return null;

packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ void TurboModuleBinding::install(
128128
return;
129129
}
130130

131-
defineReadOnlyGlobal(runtime, "RN$UnifiedNativeModuleProxy", true);
132131
defineReadOnlyGlobal(
133132
runtime,
134133
"nativeModuleProxy",

0 commit comments

Comments
 (0)