Skip to content

Commit ca68e14

Browse files
huntiemeta-codesync[bot]
authored andcommitted
Collapse enableResourceTimingAPI flag (#54511)
Summary: Pull Request resolved: #54511 Simplify flagging of Network related features by dropping `enableResourceTimingAPI`. This feature is stable (along with the rest of the Web Perf APIs), but this event type remains gated behind `enableNetworkEventReporting` (already enabled in `0.83-stable`). This preserves an opt-out ability for remaining unintegrated apps/platforms in fbsource. Changelog: [Internal] Reviewed By: rubennorte Differential Revision: D86862905 fbshipit-source-id: 22ebe59486fb3d241c8beba30bb714dcc04a48ab
1 parent 6656e2e commit ca68e14

23 files changed

Lines changed: 87 additions & 207 deletions

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

Lines changed: 2 additions & 8 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<<19656df8ed7f6c6cc897b1110f57c78e>>
7+
* @generated SignedSource<<35b171a16e75e3bb047139c0b8084f04>>
88
*/
99

1010
/**
@@ -271,7 +271,7 @@ public object ReactNativeFeatureFlags {
271271
public fun enableNativeCSSParsing(): Boolean = accessor.enableNativeCSSParsing()
272272

273273
/**
274-
* Enable network event reporting hooks in each native platform through `NetworkReporter`. This flag should be combined with `enableResourceTimingAPI` and `fuseboxNetworkInspectionEnabled` to enable end-to-end reporting behaviour via the Web Performance API and CDP debugging respectively.
274+
* Enable network event reporting hooks in each native platform through `NetworkReporter` (Web Perf APIs + CDP). This flag should be combined with `fuseboxNetworkInspectionEnabled` to enable Network CDP debugging.
275275
*/
276276
@JvmStatic
277277
public fun enableNetworkEventReporting(): Boolean = accessor.enableNetworkEventReporting()
@@ -288,12 +288,6 @@ public object ReactNativeFeatureFlags {
288288
@JvmStatic
289289
public fun enablePropsUpdateReconciliationAndroid(): Boolean = accessor.enablePropsUpdateReconciliationAndroid()
290290

291-
/**
292-
* Enables the reporting of network resource timings through `PerformanceObserver`.
293-
*/
294-
@JvmStatic
295-
public fun enableResourceTimingAPI(): Boolean = accessor.enableResourceTimingAPI()
296-
297291
/**
298292
* When enabled, it will use SwiftUI for filter effects like blur on iOS.
299293
*/

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<<9b6129ab0adfa4d0f92752f52f6d91a3>>
7+
* @generated SignedSource<<2f0412d405655c1dafc7d63a8dcb0da1>>
88
*/
99

1010
/**
@@ -63,7 +63,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
6363
private var enableNetworkEventReportingCache: Boolean? = null
6464
private var enablePreparedTextLayoutCache: Boolean? = null
6565
private var enablePropsUpdateReconciliationAndroidCache: Boolean? = null
66-
private var enableResourceTimingAPICache: Boolean? = null
6766
private var enableSwiftUIBasedFiltersCache: Boolean? = null
6867
private var enableViewCullingCache: Boolean? = null
6968
private var enableViewRecyclingCache: Boolean? = null
@@ -495,15 +494,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
495494
return cached
496495
}
497496

498-
override fun enableResourceTimingAPI(): Boolean {
499-
var cached = enableResourceTimingAPICache
500-
if (cached == null) {
501-
cached = ReactNativeFeatureFlagsCxxInterop.enableResourceTimingAPI()
502-
enableResourceTimingAPICache = cached
503-
}
504-
return cached
505-
}
506-
507497
override fun enableSwiftUIBasedFilters(): Boolean {
508498
var cached = enableSwiftUIBasedFiltersCache
509499
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<<573d80277c150ff74d51d23f2e1876fc>>
7+
* @generated SignedSource<<482e0650e142e65efdfbc394c041690d>>
88
*/
99

1010
/**
@@ -114,8 +114,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
114114

115115
@DoNotStrip @JvmStatic public external fun enablePropsUpdateReconciliationAndroid(): Boolean
116116

117-
@DoNotStrip @JvmStatic public external fun enableResourceTimingAPI(): Boolean
118-
119117
@DoNotStrip @JvmStatic public external fun enableSwiftUIBasedFilters(): Boolean
120118

121119
@DoNotStrip @JvmStatic public external fun enableViewCulling(): 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<<e3b2da8981d8ee398f753cb76e68c976>>
7+
* @generated SignedSource<<8c75d178f645340779aed6c3e0b3f016>>
88
*/
99

1010
/**
@@ -109,8 +109,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
109109

110110
override fun enablePropsUpdateReconciliationAndroid(): Boolean = false
111111

112-
override fun enableResourceTimingAPI(): Boolean = false
113-
114112
override fun enableSwiftUIBasedFilters(): Boolean = false
115113

116114
override fun enableViewCulling(): Boolean = false

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<<092b55220901732f9f21d4ccf74206e5>>
7+
* @generated SignedSource<<6217268b4398764dfd0da461d93bb55a>>
88
*/
99

1010
/**
@@ -67,7 +67,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
6767
private var enableNetworkEventReportingCache: Boolean? = null
6868
private var enablePreparedTextLayoutCache: Boolean? = null
6969
private var enablePropsUpdateReconciliationAndroidCache: Boolean? = null
70-
private var enableResourceTimingAPICache: Boolean? = null
7170
private var enableSwiftUIBasedFiltersCache: Boolean? = null
7271
private var enableViewCullingCache: Boolean? = null
7372
private var enableViewRecyclingCache: Boolean? = null
@@ -542,16 +541,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
542541
return cached
543542
}
544543

545-
override fun enableResourceTimingAPI(): Boolean {
546-
var cached = enableResourceTimingAPICache
547-
if (cached == null) {
548-
cached = currentProvider.enableResourceTimingAPI()
549-
accessedFeatureFlags.add("enableResourceTimingAPI")
550-
enableResourceTimingAPICache = cached
551-
}
552-
return cached
553-
}
554-
555544
override fun enableSwiftUIBasedFilters(): Boolean {
556545
var cached = enableSwiftUIBasedFiltersCache
557546
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<<f9edd04c2228dfbbe5a1dc36ceb48688>>
7+
* @generated SignedSource<<aea4f9836bcb46f125738d92fc03664b>>
88
*/
99

1010
/**
@@ -109,8 +109,6 @@ public interface ReactNativeFeatureFlagsProvider {
109109

110110
@DoNotStrip public fun enablePropsUpdateReconciliationAndroid(): Boolean
111111

112-
@DoNotStrip public fun enableResourceTimingAPI(): Boolean
113-
114112
@DoNotStrip public fun enableSwiftUIBasedFilters(): Boolean
115113

116114
@DoNotStrip public fun enableViewCulling(): Boolean

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<<33a06b98052c7ea82006d28b04328fa7>>
7+
* @generated SignedSource<<52f8dbc9c7975a1eb83bcb4bd4973ace>>
88
*/
99

1010
/**
@@ -297,12 +297,6 @@ class ReactNativeFeatureFlagsJavaProvider
297297
return method(javaProvider_);
298298
}
299299

300-
bool enableResourceTimingAPI() override {
301-
static const auto method =
302-
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableResourceTimingAPI");
303-
return method(javaProvider_);
304-
}
305-
306300
bool enableSwiftUIBasedFilters() override {
307301
static const auto method =
308302
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableSwiftUIBasedFilters");
@@ -780,11 +774,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enablePropsUpdateReconciliationAndroid(
780774
return ReactNativeFeatureFlags::enablePropsUpdateReconciliationAndroid();
781775
}
782776

783-
bool JReactNativeFeatureFlagsCxxInterop::enableResourceTimingAPI(
784-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
785-
return ReactNativeFeatureFlags::enableResourceTimingAPI();
786-
}
787-
788777
bool JReactNativeFeatureFlagsCxxInterop::enableSwiftUIBasedFilters(
789778
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
790779
return ReactNativeFeatureFlags::enableSwiftUIBasedFilters();
@@ -1160,9 +1149,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
11601149
makeNativeMethod(
11611150
"enablePropsUpdateReconciliationAndroid",
11621151
JReactNativeFeatureFlagsCxxInterop::enablePropsUpdateReconciliationAndroid),
1163-
makeNativeMethod(
1164-
"enableResourceTimingAPI",
1165-
JReactNativeFeatureFlagsCxxInterop::enableResourceTimingAPI),
11661152
makeNativeMethod(
11671153
"enableSwiftUIBasedFilters",
11681154
JReactNativeFeatureFlagsCxxInterop::enableSwiftUIBasedFilters),

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<<838a569cfd4e917233fdbfb5b090907b>>
7+
* @generated SignedSource<<cf83d0062141cba8907e099b01a3809f>>
88
*/
99

1010
/**
@@ -159,9 +159,6 @@ class JReactNativeFeatureFlagsCxxInterop
159159
static bool enablePropsUpdateReconciliationAndroid(
160160
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
161161

162-
static bool enableResourceTimingAPI(
163-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
164-
165162
static bool enableSwiftUIBasedFilters(
166163
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
167164

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<<3c93056dbbf315ef24520f770ccb1b6f>>
7+
* @generated SignedSource<<e938b14c610089a3ea008b85c54f2b1b>>
88
*/
99

1010
/**
@@ -198,10 +198,6 @@ bool ReactNativeFeatureFlags::enablePropsUpdateReconciliationAndroid() {
198198
return getAccessor().enablePropsUpdateReconciliationAndroid();
199199
}
200200

201-
bool ReactNativeFeatureFlags::enableResourceTimingAPI() {
202-
return getAccessor().enableResourceTimingAPI();
203-
}
204-
205201
bool ReactNativeFeatureFlags::enableSwiftUIBasedFilters() {
206202
return getAccessor().enableSwiftUIBasedFilters();
207203
}

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

Lines changed: 2 additions & 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<<4b1e0adaaee9856feb290d0ba5e18147>>
7+
* @generated SignedSource<<bebf3698e5e3e3899826da1ea2000171>>
88
*/
99

1010
/**
@@ -240,7 +240,7 @@ class ReactNativeFeatureFlags {
240240
RN_EXPORT static bool enableNativeCSSParsing();
241241

242242
/**
243-
* Enable network event reporting hooks in each native platform through `NetworkReporter`. This flag should be combined with `enableResourceTimingAPI` and `fuseboxNetworkInspectionEnabled` to enable end-to-end reporting behaviour via the Web Performance API and CDP debugging respectively.
243+
* Enable network event reporting hooks in each native platform through `NetworkReporter` (Web Perf APIs + CDP). This flag should be combined with `fuseboxNetworkInspectionEnabled` to enable Network CDP debugging.
244244
*/
245245
RN_EXPORT static bool enableNetworkEventReporting();
246246

@@ -254,11 +254,6 @@ class ReactNativeFeatureFlags {
254254
*/
255255
RN_EXPORT static bool enablePropsUpdateReconciliationAndroid();
256256

257-
/**
258-
* Enables the reporting of network resource timings through `PerformanceObserver`.
259-
*/
260-
RN_EXPORT static bool enableResourceTimingAPI();
261-
262257
/**
263258
* When enabled, it will use SwiftUI for filter effects like blur on iOS.
264259
*/

0 commit comments

Comments
 (0)