Skip to content

Commit 73968dc

Browse files
javachefacebook-github-bot
authored andcommitted
Cleanup initEagerTurboModulesOnNativeModulesQueueAndroid flag (facebook#48917)
Summary: Pull Request resolved: facebook#48917 Cleaning up this flag which has already been rolled out Changelog: [Internal] Reviewed By: cortinico Differential Revision: D68622852 fbshipit-source-id: 5767515d02ce9804976a1363532e1e626aeae0d8
1 parent 7f62ff6 commit 73968dc

21 files changed

+45
-163
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<ee8592f9694f255c1f16e847db87cefe>>
7+
* @generated SignedSource<<841c26f98395a48dad2ff748dd009f07>>
88
*/
99

1010
/**
@@ -202,12 +202,6 @@ public object ReactNativeFeatureFlags {
202202
@JvmStatic
203203
public fun fuseboxEnabledRelease(): Boolean = accessor.fuseboxEnabledRelease()
204204

205-
/**
206-
* Construct modules that requires eager init on the dedicate native modules thread
207-
*/
208-
@JvmStatic
209-
public fun initEagerTurboModulesOnNativeModulesQueueAndroid(): Boolean = accessor.initEagerTurboModulesOnNativeModulesQueueAndroid()
210-
211205
/**
212206
* Only enqueue Choreographer calls if there is an ongoing animation, instead of enqueueing every frame.
213207
*/

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<9e914ad3b6c5e588c65fc4ff189299f4>>
7+
* @generated SignedSource<<735455b25aae2fa07a5e36e478b78f0f>>
88
*/
99

1010
/**
@@ -49,7 +49,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
4949
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
5050
private var fixMountingCoordinatorReportedPendingTransactionsOnAndroidCache: Boolean? = null
5151
private var fuseboxEnabledReleaseCache: Boolean? = null
52-
private var initEagerTurboModulesOnNativeModulesQueueAndroidCache: Boolean? = null
5352
private var lazyAnimationCallbacksCache: Boolean? = null
5453
private var loadVectorDrawablesOnImagesCache: Boolean? = null
5554
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
@@ -325,15 +324,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
325324
return cached
326325
}
327326

328-
override fun initEagerTurboModulesOnNativeModulesQueueAndroid(): Boolean {
329-
var cached = initEagerTurboModulesOnNativeModulesQueueAndroidCache
330-
if (cached == null) {
331-
cached = ReactNativeFeatureFlagsCxxInterop.initEagerTurboModulesOnNativeModulesQueueAndroid()
332-
initEagerTurboModulesOnNativeModulesQueueAndroidCache = cached
333-
}
334-
return cached
335-
}
336-
337327
override fun lazyAnimationCallbacks(): Boolean {
338328
var cached = lazyAnimationCallbacksCache
339329
if (cached == null) {

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<de387611b8d57f9c468a641c1eec6e09>>
7+
* @generated SignedSource<<6390e3da6c736f01254531394b566e39>>
88
*/
99

1010
/**
@@ -86,8 +86,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
8686

8787
@DoNotStrip @JvmStatic public external fun fuseboxEnabledRelease(): Boolean
8888

89-
@DoNotStrip @JvmStatic public external fun initEagerTurboModulesOnNativeModulesQueueAndroid(): Boolean
90-
9189
@DoNotStrip @JvmStatic public external fun lazyAnimationCallbacks(): Boolean
9290

9391
@DoNotStrip @JvmStatic public external fun loadVectorDrawablesOnImages(): Boolean

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<60faf8d807eeec68261bffb84bb3794b>>
7+
* @generated SignedSource<<588a6c3434cdf6ccb470cd8bb914fae0>>
88
*/
99

1010
/**
@@ -81,8 +81,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
8181

8282
override fun fuseboxEnabledRelease(): Boolean = false
8383

84-
override fun initEagerTurboModulesOnNativeModulesQueueAndroid(): Boolean = true
85-
8684
override fun lazyAnimationCallbacks(): Boolean = false
8785

8886
override fun loadVectorDrawablesOnImages(): Boolean = true

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<2074a87060761850c6d619aaac40e0cf>>
7+
* @generated SignedSource<<5d69e428af96cdbb839db2d22920c7fc>>
88
*/
99

1010
/**
@@ -53,7 +53,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
5353
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
5454
private var fixMountingCoordinatorReportedPendingTransactionsOnAndroidCache: Boolean? = null
5555
private var fuseboxEnabledReleaseCache: Boolean? = null
56-
private var initEagerTurboModulesOnNativeModulesQueueAndroidCache: Boolean? = null
5756
private var lazyAnimationCallbacksCache: Boolean? = null
5857
private var loadVectorDrawablesOnImagesCache: Boolean? = null
5958
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
@@ -358,16 +357,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
358357
return cached
359358
}
360359

361-
override fun initEagerTurboModulesOnNativeModulesQueueAndroid(): Boolean {
362-
var cached = initEagerTurboModulesOnNativeModulesQueueAndroidCache
363-
if (cached == null) {
364-
cached = currentProvider.initEagerTurboModulesOnNativeModulesQueueAndroid()
365-
accessedFeatureFlags.add("initEagerTurboModulesOnNativeModulesQueueAndroid")
366-
initEagerTurboModulesOnNativeModulesQueueAndroidCache = cached
367-
}
368-
return cached
369-
}
370-
371360
override fun lazyAnimationCallbacks(): Boolean {
372361
var cached = lazyAnimationCallbacksCache
373362
if (cached == null) {

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<8c953d87b8fb25b0d52ddd916312a1d9>>
7+
* @generated SignedSource<<6ec0906be44bb10e8b87bce7d70fdce2>>
88
*/
99

1010
/**
@@ -81,8 +81,6 @@ public interface ReactNativeFeatureFlagsProvider {
8181

8282
@DoNotStrip public fun fuseboxEnabledRelease(): Boolean
8383

84-
@DoNotStrip public fun initEagerTurboModulesOnNativeModulesQueueAndroid(): Boolean
85-
8684
@DoNotStrip public fun lazyAnimationCallbacks(): Boolean
8785

8886
@DoNotStrip public fun loadVectorDrawablesOnImages(): Boolean

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactInstance.java

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -288,21 +288,18 @@ final class ReactInstance {
288288
}
289289

290290
void initializeEagerTurboModules() {
291-
Runnable task =
292-
() -> {
293-
Systrace.beginSection(
294-
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "initializeEagerTurboModules");
295-
// Eagerly initialize TurboModules
296-
for (String moduleName : mTurboModuleManager.getEagerInitModuleNames()) {
297-
mTurboModuleManager.getModule(moduleName);
298-
}
299-
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
300-
};
301-
if (ReactNativeFeatureFlags.initEagerTurboModulesOnNativeModulesQueueAndroid()) {
302-
mQueueConfiguration.getNativeModulesQueueThread().runOnQueue(task);
303-
} else {
304-
task.run();
305-
}
291+
mQueueConfiguration
292+
.getNativeModulesQueueThread()
293+
.runOnQueue(
294+
() -> {
295+
Systrace.beginSection(
296+
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "initializeEagerTurboModules");
297+
// Eagerly initialize TurboModules
298+
for (String moduleName : mTurboModuleManager.getEagerInitModuleNames()) {
299+
mTurboModuleManager.getModule(moduleName);
300+
}
301+
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
302+
});
306303
}
307304

308305
private static synchronized void loadLibraryIfNeeded() {

packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<0535dda0566486d4f985019bec2020cc>>
7+
* @generated SignedSource<<0252081684dcdb8295018b34980fcac2>>
88
*/
99

1010
/**
@@ -213,12 +213,6 @@ class ReactNativeFeatureFlagsProviderHolder
213213
return method(javaProvider_);
214214
}
215215

216-
bool initEagerTurboModulesOnNativeModulesQueueAndroid() override {
217-
static const auto method =
218-
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("initEagerTurboModulesOnNativeModulesQueueAndroid");
219-
return method(javaProvider_);
220-
}
221-
222216
bool lazyAnimationCallbacks() override {
223217
static const auto method =
224218
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("lazyAnimationCallbacks");
@@ -446,11 +440,6 @@ bool JReactNativeFeatureFlagsCxxInterop::fuseboxEnabledRelease(
446440
return ReactNativeFeatureFlags::fuseboxEnabledRelease();
447441
}
448442

449-
bool JReactNativeFeatureFlagsCxxInterop::initEagerTurboModulesOnNativeModulesQueueAndroid(
450-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
451-
return ReactNativeFeatureFlags::initEagerTurboModulesOnNativeModulesQueueAndroid();
452-
}
453-
454443
bool JReactNativeFeatureFlagsCxxInterop::lazyAnimationCallbacks(
455444
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
456445
return ReactNativeFeatureFlags::lazyAnimationCallbacks();
@@ -634,9 +623,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
634623
makeNativeMethod(
635624
"fuseboxEnabledRelease",
636625
JReactNativeFeatureFlagsCxxInterop::fuseboxEnabledRelease),
637-
makeNativeMethod(
638-
"initEagerTurboModulesOnNativeModulesQueueAndroid",
639-
JReactNativeFeatureFlagsCxxInterop::initEagerTurboModulesOnNativeModulesQueueAndroid),
640626
makeNativeMethod(
641627
"lazyAnimationCallbacks",
642628
JReactNativeFeatureFlagsCxxInterop::lazyAnimationCallbacks),

packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<55065c8f506e80d82183546c6f8bb886>>
7+
* @generated SignedSource<<c751e39a2a924bf55d5529a4e86ad99b>>
88
*/
99

1010
/**
@@ -117,9 +117,6 @@ class JReactNativeFeatureFlagsCxxInterop
117117
static bool fuseboxEnabledRelease(
118118
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
119119

120-
static bool initEagerTurboModulesOnNativeModulesQueueAndroid(
121-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
122-
123120
static bool lazyAnimationCallbacks(
124121
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
125122

packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<9e1ad3e6933a841b71af755966c94dce>>
7+
* @generated SignedSource<<097c771aa1ff769709f7d08a75da50b6>>
88
*/
99

1010
/**
@@ -142,10 +142,6 @@ bool ReactNativeFeatureFlags::fuseboxEnabledRelease() {
142142
return getAccessor().fuseboxEnabledRelease();
143143
}
144144

145-
bool ReactNativeFeatureFlags::initEagerTurboModulesOnNativeModulesQueueAndroid() {
146-
return getAccessor().initEagerTurboModulesOnNativeModulesQueueAndroid();
147-
}
148-
149145
bool ReactNativeFeatureFlags::lazyAnimationCallbacks() {
150146
return getAccessor().lazyAnimationCallbacks();
151147
}

0 commit comments

Comments
 (0)