Introduce enableNetworkEventReporting and enableResourceTimingAPI feature flags

Summary: Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D73995231

fbshipit-source-id: ade6f858b14928a32fa022d4e9a85704bc944726
This commit is contained in:
Alex Hunt authored and Facebook GitHub Bot committed 2025-05-01 07:00:52 -07:00
1 parent 07073fbac8
commit ba5acdba83
20 files changed
+273 -41

No files matched your search

@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<519e6095d6c91fbbb4225a066c9cbe26>>
* @generated SignedSource<<62ec58d76b9e14b3e1e4e10e62fc196a>>
*/
/**
@@ -162,6 +162,12 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun enableNativeCSSParsing(): Boolean = accessor.enableNativeCSSParsing()
/**
* 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.
*/
@JvmStatic
public fun enableNetworkEventReporting(): Boolean = accessor.enableNetworkEventReporting()
/**
* Use BackgroundDrawable and BorderDrawable instead of CSSBackgroundDrawable
*/
@@ -174,6 +180,12 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun enablePropsUpdateReconciliationAndroid(): Boolean = accessor.enablePropsUpdateReconciliationAndroid()
/**
* Enables the reporting of network resource timings through `PerformanceObserver`.
*/
@JvmStatic
public fun enableResourceTimingAPI(): Boolean = accessor.enableResourceTimingAPI()
/**
* Dispatches state updates synchronously in Fabric (e.g.: updates the scroll position in the shadow tree synchronously from the main thread).
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<a70b3ffda510a41144b061036d4f1d48>>
* @generated SignedSource<<03596dcddbe8976adfcf454b9b35e3c3>>
*/
/**
@@ -42,8 +42,10 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var enableLayoutAnimationsOnIOSCache: Boolean? = null
private var enableMainQueueModulesOnIOSCache: Boolean? = null
private var enableNativeCSSParsingCache: Boolean? = null
private var enableNetworkEventReportingCache: Boolean? = null
private var enableNewBackgroundAndBorderDrawablesCache: Boolean? = null
private var enablePropsUpdateReconciliationAndroidCache: Boolean? = null
private var enableResourceTimingAPICache: Boolean? = null
private var enableSynchronousStateUpdatesCache: Boolean? = null
private var enableViewCullingCache: Boolean? = null
private var enableViewRecyclingCache: Boolean? = null
@@ -262,6 +264,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}
override fun enableNetworkEventReporting(): Boolean {
var cached = enableNetworkEventReportingCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.enableNetworkEventReporting()
enableNetworkEventReportingCache = cached
}
return cached
}
override fun enableNewBackgroundAndBorderDrawables(): Boolean {
var cached = enableNewBackgroundAndBorderDrawablesCache
if (cached == null) {
@@ -280,6 +291,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}
override fun enableResourceTimingAPI(): Boolean {
var cached = enableResourceTimingAPICache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.enableResourceTimingAPI()
enableResourceTimingAPICache = cached
}
return cached
}
override fun enableSynchronousStateUpdates(): Boolean {
var cached = enableSynchronousStateUpdatesCache
if (cached == null) {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<6107b2e4611a6cd6ad67420eee468601>>
* @generated SignedSource<<eeeeed4a48a3627d5d51635da9c15cb7>>
*/
/**
@@ -72,10 +72,14 @@ public object ReactNativeFeatureFlagsCxxInterop {
@DoNotStrip @JvmStatic public external fun enableNativeCSSParsing(): Boolean
@DoNotStrip @JvmStatic public external fun enableNetworkEventReporting(): Boolean
@DoNotStrip @JvmStatic public external fun enableNewBackgroundAndBorderDrawables(): Boolean
@DoNotStrip @JvmStatic public external fun enablePropsUpdateReconciliationAndroid(): Boolean
@DoNotStrip @JvmStatic public external fun enableResourceTimingAPI(): Boolean
@DoNotStrip @JvmStatic public external fun enableSynchronousStateUpdates(): Boolean
@DoNotStrip @JvmStatic public external fun enableViewCulling(): Boolean
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<ad976c46e40f6d8a945041388865ec60>>
* @generated SignedSource<<7d343ae73a15daf1a4d8d85ba959dd81>>
*/
/**
@@ -67,10 +67,14 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
override fun enableNativeCSSParsing(): Boolean = false
override fun enableNetworkEventReporting(): Boolean = false
override fun enableNewBackgroundAndBorderDrawables(): Boolean = true
override fun enablePropsUpdateReconciliationAndroid(): Boolean = false
override fun enableResourceTimingAPI(): Boolean = false
override fun enableSynchronousStateUpdates(): Boolean = false
override fun enableViewCulling(): Boolean = false
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<580a0bc36f98e9680387089a9740bba8>>
* @generated SignedSource<<f4ae0172bfb1c4d64213c0cd14320bdd>>
*/
/**
@@ -46,8 +46,10 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var enableLayoutAnimationsOnIOSCache: Boolean? = null
private var enableMainQueueModulesOnIOSCache: Boolean? = null
private var enableNativeCSSParsingCache: Boolean? = null
private var enableNetworkEventReportingCache: Boolean? = null
private var enableNewBackgroundAndBorderDrawablesCache: Boolean? = null
private var enablePropsUpdateReconciliationAndroidCache: Boolean? = null
private var enableResourceTimingAPICache: Boolean? = null
private var enableSynchronousStateUpdatesCache: Boolean? = null
private var enableViewCullingCache: Boolean? = null
private var enableViewRecyclingCache: Boolean? = null
@@ -288,6 +290,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}
override fun enableNetworkEventReporting(): Boolean {
var cached = enableNetworkEventReportingCache
if (cached == null) {
cached = currentProvider.enableNetworkEventReporting()
accessedFeatureFlags.add("enableNetworkEventReporting")
enableNetworkEventReportingCache = cached
}
return cached
}
override fun enableNewBackgroundAndBorderDrawables(): Boolean {
var cached = enableNewBackgroundAndBorderDrawablesCache
if (cached == null) {
@@ -308,6 +320,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}
override fun enableResourceTimingAPI(): Boolean {
var cached = enableResourceTimingAPICache
if (cached == null) {
cached = currentProvider.enableResourceTimingAPI()
accessedFeatureFlags.add("enableResourceTimingAPI")
enableResourceTimingAPICache = cached
}
return cached
}
override fun enableSynchronousStateUpdates(): Boolean {
var cached = enableSynchronousStateUpdatesCache
if (cached == null) {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<b4a944a07650cf46f90d86419b11bbee>>
* @generated SignedSource<<3b830939241e6fde03e6e63faa7232ff>>
*/
/**
@@ -67,10 +67,14 @@ public interface ReactNativeFeatureFlagsProvider {
@DoNotStrip public fun enableNativeCSSParsing(): Boolean
@DoNotStrip public fun enableNetworkEventReporting(): Boolean
@DoNotStrip public fun enableNewBackgroundAndBorderDrawables(): Boolean
@DoNotStrip public fun enablePropsUpdateReconciliationAndroid(): Boolean
@DoNotStrip public fun enableResourceTimingAPI(): Boolean
@DoNotStrip public fun enableSynchronousStateUpdates(): Boolean
@DoNotStrip public fun enableViewCulling(): Boolean
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<b07fb300852699f3066090549af0b994>>
* @generated SignedSource<<a176560c48267f25dd8fdb5a1a232d37>>
*/
/**
@@ -171,6 +171,12 @@ class ReactNativeFeatureFlagsJavaProvider
return method(javaProvider_);
}
bool enableNetworkEventReporting() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableNetworkEventReporting");
return method(javaProvider_);
}
bool enableNewBackgroundAndBorderDrawables() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableNewBackgroundAndBorderDrawables");
@@ -183,6 +189,12 @@ class ReactNativeFeatureFlagsJavaProvider
return method(javaProvider_);
}
bool enableResourceTimingAPI() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableResourceTimingAPI");
return method(javaProvider_);
}
bool enableSynchronousStateUpdates() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableSynchronousStateUpdates");
@@ -411,6 +423,11 @@ bool JReactNativeFeatureFlagsCxxInterop::enableNativeCSSParsing(
return ReactNativeFeatureFlags::enableNativeCSSParsing();
}
bool JReactNativeFeatureFlagsCxxInterop::enableNetworkEventReporting(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableNetworkEventReporting();
}
bool JReactNativeFeatureFlagsCxxInterop::enableNewBackgroundAndBorderDrawables(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableNewBackgroundAndBorderDrawables();
@@ -421,6 +438,11 @@ bool JReactNativeFeatureFlagsCxxInterop::enablePropsUpdateReconciliationAndroid(
return ReactNativeFeatureFlags::enablePropsUpdateReconciliationAndroid();
}
bool JReactNativeFeatureFlagsCxxInterop::enableResourceTimingAPI(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableResourceTimingAPI();
}
bool JReactNativeFeatureFlagsCxxInterop::enableSynchronousStateUpdates(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableSynchronousStateUpdates();
@@ -613,12 +635,18 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"enableNativeCSSParsing",
JReactNativeFeatureFlagsCxxInterop::enableNativeCSSParsing),
makeNativeMethod(
"enableNetworkEventReporting",
JReactNativeFeatureFlagsCxxInterop::enableNetworkEventReporting),
makeNativeMethod(
"enableNewBackgroundAndBorderDrawables",
JReactNativeFeatureFlagsCxxInterop::enableNewBackgroundAndBorderDrawables),
makeNativeMethod(
"enablePropsUpdateReconciliationAndroid",
JReactNativeFeatureFlagsCxxInterop::enablePropsUpdateReconciliationAndroid),
makeNativeMethod(
"enableResourceTimingAPI",
JReactNativeFeatureFlagsCxxInterop::enableResourceTimingAPI),
makeNativeMethod(
"enableSynchronousStateUpdates",
JReactNativeFeatureFlagsCxxInterop::enableSynchronousStateUpdates),
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<963cdfe340c23ca3ca6e43020a3ab608>>
* @generated SignedSource<<dae3956726e1cbbb2b78d9fffaeca6dd>>
*/
/**
@@ -96,12 +96,18 @@ class JReactNativeFeatureFlagsCxxInterop
static bool enableNativeCSSParsing(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool enableNetworkEventReporting(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool enableNewBackgroundAndBorderDrawables(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool enablePropsUpdateReconciliationAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool enableResourceTimingAPI(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool enableSynchronousStateUpdates(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<da8e7e537e16a1338c7a56b1d17b2c6e>>
* @generated SignedSource<<42e3fd2958733abb652f73d87b5b4a7d>>
*/
/**
@@ -114,6 +114,10 @@ bool ReactNativeFeatureFlags::enableNativeCSSParsing() {
return getAccessor().enableNativeCSSParsing();
}
bool ReactNativeFeatureFlags::enableNetworkEventReporting() {
return getAccessor().enableNetworkEventReporting();
}
bool ReactNativeFeatureFlags::enableNewBackgroundAndBorderDrawables() {
return getAccessor().enableNewBackgroundAndBorderDrawables();
}
@@ -122,6 +126,10 @@ bool ReactNativeFeatureFlags::enablePropsUpdateReconciliationAndroid() {
return getAccessor().enablePropsUpdateReconciliationAndroid();
}
bool ReactNativeFeatureFlags::enableResourceTimingAPI() {
return getAccessor().enableResourceTimingAPI();
}
bool ReactNativeFeatureFlags::enableSynchronousStateUpdates() {
return getAccessor().enableSynchronousStateUpdates();
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<43fcd5c23c1eb9b91d3bc26d5543a4b7>>
* @generated SignedSource<<871f96445659d2f927efeda5480b6f96>>
*/
/**
@@ -149,6 +149,11 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool enableNativeCSSParsing();
/**
* 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.
*/
RN_EXPORT static bool enableNetworkEventReporting();
/**
* Use BackgroundDrawable and BorderDrawable instead of CSSBackgroundDrawable
*/
@@ -159,6 +164,11 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool enablePropsUpdateReconciliationAndroid();
/**
* Enables the reporting of network resource timings through `PerformanceObserver`.
*/
RN_EXPORT static bool enableResourceTimingAPI();
/**
* Dispatches state updates synchronously in Fabric (e.g.: updates the scroll position in the shadow tree synchronously from the main thread).
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<18b19e4eef226bc502f31d36ada48a53>>
* @generated SignedSource<<123a0fa8ab74ffe6b6dbc47527498147>>
*/
/**
@@ -425,6 +425,24 @@ bool ReactNativeFeatureFlagsAccessor::enableNativeCSSParsing() {
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::enableNetworkEventReporting() {
auto flagValue = enableNetworkEventReporting_.load();
if (!flagValue.has_value()) {
// This block is not exclusive but it is not necessary.
// If multiple threads try to initialize the feature flag, we would only
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(22, "enableNetworkEventReporting");
flagValue = currentProvider_->enableNetworkEventReporting();
enableNetworkEventReporting_ = flagValue;
}
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::enableNewBackgroundAndBorderDrawables() {
auto flagValue = enableNewBackgroundAndBorderDrawables_.load();
@@ -434,7 +452,7 @@ bool ReactNativeFeatureFlagsAccessor::enableNewBackgroundAndBorderDrawables() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(22, "enableNewBackgroundAndBorderDrawables");
markFlagAsAccessed(23, "enableNewBackgroundAndBorderDrawables");
flagValue = currentProvider_->enableNewBackgroundAndBorderDrawables();
enableNewBackgroundAndBorderDrawables_ = flagValue;
@@ -452,7 +470,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePropsUpdateReconciliationAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(23, "enablePropsUpdateReconciliationAndroid");
markFlagAsAccessed(24, "enablePropsUpdateReconciliationAndroid");
flagValue = currentProvider_->enablePropsUpdateReconciliationAndroid();
enablePropsUpdateReconciliationAndroid_ = flagValue;
@@ -461,6 +479,24 @@ bool ReactNativeFeatureFlagsAccessor::enablePropsUpdateReconciliationAndroid() {
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::enableResourceTimingAPI() {
auto flagValue = enableResourceTimingAPI_.load();
if (!flagValue.has_value()) {
// This block is not exclusive but it is not necessary.
// If multiple threads try to initialize the feature flag, we would only
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(25, "enableResourceTimingAPI");
flagValue = currentProvider_->enableResourceTimingAPI();
enableResourceTimingAPI_ = flagValue;
}
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::enableSynchronousStateUpdates() {
auto flagValue = enableSynchronousStateUpdates_.load();
@@ -470,7 +506,7 @@ bool ReactNativeFeatureFlagsAccessor::enableSynchronousStateUpdates() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(24, "enableSynchronousStateUpdates");
markFlagAsAccessed(26, "enableSynchronousStateUpdates");
flagValue = currentProvider_->enableSynchronousStateUpdates();
enableSynchronousStateUpdates_ = flagValue;
@@ -488,7 +524,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewCulling() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(25, "enableViewCulling");
markFlagAsAccessed(27, "enableViewCulling");
flagValue = currentProvider_->enableViewCulling();
enableViewCulling_ = flagValue;
@@ -506,7 +542,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecycling() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(26, "enableViewRecycling");
markFlagAsAccessed(28, "enableViewRecycling");
flagValue = currentProvider_->enableViewRecycling();
enableViewRecycling_ = flagValue;
@@ -524,7 +560,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForText() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(27, "enableViewRecyclingForText");
markFlagAsAccessed(29, "enableViewRecyclingForText");
flagValue = currentProvider_->enableViewRecyclingForText();
enableViewRecyclingForText_ = flagValue;
@@ -542,7 +578,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForView() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(28, "enableViewRecyclingForView");
markFlagAsAccessed(30, "enableViewRecyclingForView");
flagValue = currentProvider_->enableViewRecyclingForView();
enableViewRecyclingForView_ = flagValue;
@@ -560,7 +596,7 @@ bool ReactNativeFeatureFlagsAccessor::fixMappingOfEventPrioritiesBetweenFabricAn
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(29, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
markFlagAsAccessed(31, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
flagValue = currentProvider_->fixMappingOfEventPrioritiesBetweenFabricAndReact();
fixMappingOfEventPrioritiesBetweenFabricAndReact_ = flagValue;
@@ -578,7 +614,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxEnabledRelease() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(30, "fuseboxEnabledRelease");
markFlagAsAccessed(32, "fuseboxEnabledRelease");
flagValue = currentProvider_->fuseboxEnabledRelease();
fuseboxEnabledRelease_ = flagValue;
@@ -596,7 +632,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxNetworkInspectionEnabled() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(31, "fuseboxNetworkInspectionEnabled");
markFlagAsAccessed(33, "fuseboxNetworkInspectionEnabled");
flagValue = currentProvider_->fuseboxNetworkInspectionEnabled();
fuseboxNetworkInspectionEnabled_ = flagValue;
@@ -614,7 +650,7 @@ bool ReactNativeFeatureFlagsAccessor::traceTurboModulePromiseRejectionsOnAndroid
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(32, "traceTurboModulePromiseRejectionsOnAndroid");
markFlagAsAccessed(34, "traceTurboModulePromiseRejectionsOnAndroid");
flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid();
traceTurboModulePromiseRejectionsOnAndroid_ = flagValue;
@@ -632,7 +668,7 @@ bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommit(
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(33, "updateRuntimeShadowNodeReferencesOnCommit");
markFlagAsAccessed(35, "updateRuntimeShadowNodeReferencesOnCommit");
flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit();
updateRuntimeShadowNodeReferencesOnCommit_ = flagValue;
@@ -650,7 +686,7 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(34, "useAlwaysAvailableJSErrorHandling");
markFlagAsAccessed(36, "useAlwaysAvailableJSErrorHandling");
flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling();
useAlwaysAvailableJSErrorHandling_ = flagValue;
@@ -668,7 +704,7 @@ bool ReactNativeFeatureFlagsAccessor::useEditTextStockAndroidFocusBehavior() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(35, "useEditTextStockAndroidFocusBehavior");
markFlagAsAccessed(37, "useEditTextStockAndroidFocusBehavior");
flagValue = currentProvider_->useEditTextStockAndroidFocusBehavior();
useEditTextStockAndroidFocusBehavior_ = flagValue;
@@ -686,7 +722,7 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(36, "useFabricInterop");
markFlagAsAccessed(38, "useFabricInterop");
flagValue = currentProvider_->useFabricInterop();
useFabricInterop_ = flagValue;
@@ -704,7 +740,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(37, "useNativeViewConfigsInBridgelessMode");
markFlagAsAccessed(39, "useNativeViewConfigsInBridgelessMode");
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
useNativeViewConfigsInBridgelessMode_ = flagValue;
@@ -722,7 +758,7 @@ bool ReactNativeFeatureFlagsAccessor::useOptimizedEventBatchingOnAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(38, "useOptimizedEventBatchingOnAndroid");
markFlagAsAccessed(40, "useOptimizedEventBatchingOnAndroid");
flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid();
useOptimizedEventBatchingOnAndroid_ = flagValue;
@@ -740,7 +776,7 @@ bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(39, "useRawPropsJsiValue");
markFlagAsAccessed(41, "useRawPropsJsiValue");
flagValue = currentProvider_->useRawPropsJsiValue();
useRawPropsJsiValue_ = flagValue;
@@ -758,7 +794,7 @@ bool ReactNativeFeatureFlagsAccessor::useShadowNodeStateOnClone() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(40, "useShadowNodeStateOnClone");
markFlagAsAccessed(42, "useShadowNodeStateOnClone");
flagValue = currentProvider_->useShadowNodeStateOnClone();
useShadowNodeStateOnClone_ = flagValue;
@@ -776,7 +812,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(41, "useTurboModuleInterop");
markFlagAsAccessed(43, "useTurboModuleInterop");
flagValue = currentProvider_->useTurboModuleInterop();
useTurboModuleInterop_ = flagValue;
@@ -794,7 +830,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(42, "useTurboModules");
markFlagAsAccessed(44, "useTurboModules");
flagValue = currentProvider_->useTurboModules();
useTurboModules_ = flagValue;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<4be34538399efc2c7190f35b57d99aec>>
* @generated SignedSource<<fe5d6525d92f5520a11b5c0ee930886e>>
*/
/**
@@ -54,8 +54,10 @@ class ReactNativeFeatureFlagsAccessor {
bool enableLayoutAnimationsOnIOS();
bool enableMainQueueModulesOnIOS();
bool enableNativeCSSParsing();
bool enableNetworkEventReporting();
bool enableNewBackgroundAndBorderDrawables();
bool enablePropsUpdateReconciliationAndroid();
bool enableResourceTimingAPI();
bool enableSynchronousStateUpdates();
bool enableViewCulling();
bool enableViewRecycling();
@@ -86,7 +88,7 @@ class ReactNativeFeatureFlagsAccessor {
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
bool wasOverridden_;
std::array<std::atomic<const char*>, 43> accessedFeatureFlags_;
std::array<std::atomic<const char*>, 45> accessedFeatureFlags_;
std::atomic<std::optional<bool>> commonTestFlag_;
std::atomic<std::optional<bool>> animatedShouldSignalBatch_;
@@ -110,8 +112,10 @@ class ReactNativeFeatureFlagsAccessor {
std::atomic<std::optional<bool>> enableLayoutAnimationsOnIOS_;
std::atomic<std::optional<bool>> enableMainQueueModulesOnIOS_;
std::atomic<std::optional<bool>> enableNativeCSSParsing_;
std::atomic<std::optional<bool>> enableNetworkEventReporting_;
std::atomic<std::optional<bool>> enableNewBackgroundAndBorderDrawables_;
std::atomic<std::optional<bool>> enablePropsUpdateReconciliationAndroid_;
std::atomic<std::optional<bool>> enableResourceTimingAPI_;
std::atomic<std::optional<bool>> enableSynchronousStateUpdates_;
std::atomic<std::optional<bool>> enableViewCulling_;
std::atomic<std::optional<bool>> enableViewRecycling_;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<82cdae47f241f17524ce1b4cbaf5d7e2>>
* @generated SignedSource<<9efccdd812d3d0fdd2d1a0061d778eaa>>
*/
/**
@@ -115,6 +115,10 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
return false;
}
bool enableNetworkEventReporting() override {
return false;
}
bool enableNewBackgroundAndBorderDrawables() override {
return true;
}
@@ -123,6 +127,10 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
return false;
}
bool enableResourceTimingAPI() override {
return false;
}
bool enableSynchronousStateUpdates() override {
return false;
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<f9749a9af3dff2d030ff401915f46ece>>
* @generated SignedSource<<56265417ba766f9a9c39a7a0bc74c1ab>>
*/
/**
@@ -243,6 +243,15 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
return ReactNativeFeatureFlagsDefaults::enableNativeCSSParsing();
}
bool enableNetworkEventReporting() override {
auto value = values_["enableNetworkEventReporting"];
if (!value.isNull()) {
return value.getBool();
}
return ReactNativeFeatureFlagsDefaults::enableNetworkEventReporting();
}
bool enableNewBackgroundAndBorderDrawables() override {
auto value = values_["enableNewBackgroundAndBorderDrawables"];
if (!value.isNull()) {
@@ -261,6 +270,15 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
return ReactNativeFeatureFlagsDefaults::enablePropsUpdateReconciliationAndroid();
}
bool enableResourceTimingAPI() override {
auto value = values_["enableResourceTimingAPI"];
if (!value.isNull()) {
return value.getBool();
}
return ReactNativeFeatureFlagsDefaults::enableResourceTimingAPI();
}
bool enableSynchronousStateUpdates() override {
auto value = values_["enableSynchronousStateUpdates"];
if (!value.isNull()) {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<cbd205716995b7d53e0426d821cf381e>>
* @generated SignedSource<<f9145b76aab027f1c7bb8bf527e1981b>>
*/
/**
@@ -47,8 +47,10 @@ class ReactNativeFeatureFlagsProvider {
virtual bool enableLayoutAnimationsOnIOS() = 0;
virtual bool enableMainQueueModulesOnIOS() = 0;
virtual bool enableNativeCSSParsing() = 0;
virtual bool enableNetworkEventReporting() = 0;
virtual bool enableNewBackgroundAndBorderDrawables() = 0;
virtual bool enablePropsUpdateReconciliationAndroid() = 0;
virtual bool enableResourceTimingAPI() = 0;
virtual bool enableSynchronousStateUpdates() = 0;
virtual bool enableViewCulling() = 0;
virtual bool enableViewRecycling() = 0;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<7aa76d7bbd51de2cc1e3da0ac88e7b56>>
* @generated SignedSource<<219f788801dd2361011cedabb004dd9a>>
*/
/**
@@ -154,6 +154,11 @@ bool NativeReactNativeFeatureFlags::enableNativeCSSParsing(
return ReactNativeFeatureFlags::enableNativeCSSParsing();
}
bool NativeReactNativeFeatureFlags::enableNetworkEventReporting(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::enableNetworkEventReporting();
}
bool NativeReactNativeFeatureFlags::enableNewBackgroundAndBorderDrawables(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::enableNewBackgroundAndBorderDrawables();
@@ -164,6 +169,11 @@ bool NativeReactNativeFeatureFlags::enablePropsUpdateReconciliationAndroid(
return ReactNativeFeatureFlags::enablePropsUpdateReconciliationAndroid();
}
bool NativeReactNativeFeatureFlags::enableResourceTimingAPI(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::enableResourceTimingAPI();
}
bool NativeReactNativeFeatureFlags::enableSynchronousStateUpdates(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::enableSynchronousStateUpdates();
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<b5b7e8a4b0eb26b5ceea212700ae6efe>>
* @generated SignedSource<<4d0bd91d4b6685104d89086086a100d3>>
*/
/**
@@ -81,10 +81,14 @@ class NativeReactNativeFeatureFlags
bool enableNativeCSSParsing(jsi::Runtime& runtime);
bool enableNetworkEventReporting(jsi::Runtime& runtime);
bool enableNewBackgroundAndBorderDrawables(jsi::Runtime& runtime);
bool enablePropsUpdateReconciliationAndroid(jsi::Runtime& runtime);
bool enableResourceTimingAPI(jsi::Runtime& runtime);
bool enableSynchronousStateUpdates(jsi::Runtime& runtime);
bool enableViewCulling(jsi::Runtime& runtime);
@@ -276,6 +276,16 @@ const definitions: FeatureFlagDefinitions = {
},
ossReleaseStage: 'none',
},
enableNetworkEventReporting: {
defaultValue: false,
metadata: {
description:
'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.',
expectedReleaseValue: true,
purpose: 'release',
},
ossReleaseStage: 'none',
},
enableNewBackgroundAndBorderDrawables: {
defaultValue: true,
metadata: {
@@ -298,6 +308,16 @@ const definitions: FeatureFlagDefinitions = {
},
ossReleaseStage: 'none',
},
enableResourceTimingAPI: {
defaultValue: false,
metadata: {
description:
'Enables the reporting of network resource timings through `PerformanceObserver`.',
expectedReleaseValue: true,
purpose: 'release',
},
ossReleaseStage: 'none',
},
enableSynchronousStateUpdates: {
defaultValue: false,
metadata: {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<7d8d9fdc5a0a3133890ae00bb7a1436c>>
* @generated SignedSource<<e246cdb6a10fd895477220446080a342>>
* @flow strict
*/
@@ -68,8 +68,10 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
enableLayoutAnimationsOnIOS: Getter<boolean>,
enableMainQueueModulesOnIOS: Getter<boolean>,
enableNativeCSSParsing: Getter<boolean>,
enableNetworkEventReporting: Getter<boolean>,
enableNewBackgroundAndBorderDrawables: Getter<boolean>,
enablePropsUpdateReconciliationAndroid: Getter<boolean>,
enableResourceTimingAPI: Getter<boolean>,
enableSynchronousStateUpdates: Getter<boolean>,
enableViewCulling: Getter<boolean>,
enableViewRecycling: Getter<boolean>,
@@ -243,6 +245,10 @@ export const enableMainQueueModulesOnIOS: Getter<boolean> = createNativeFlagGett
* Parse CSS strings using the Fabric CSS parser instead of ViewConfig processing
*/
export const enableNativeCSSParsing: Getter<boolean> = createNativeFlagGetter('enableNativeCSSParsing', false);
/**
* 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.
*/
export const enableNetworkEventReporting: Getter<boolean> = createNativeFlagGetter('enableNetworkEventReporting', false);
/**
* Use BackgroundDrawable and BorderDrawable instead of CSSBackgroundDrawable
*/
@@ -251,6 +257,10 @@ export const enableNewBackgroundAndBorderDrawables: Getter<boolean> = createNati
* When enabled, Android will receive prop updates based on the differences between the last rendered shadow node and the last committed shadow node.
*/
export const enablePropsUpdateReconciliationAndroid: Getter<boolean> = createNativeFlagGetter('enablePropsUpdateReconciliationAndroid', false);
/**
* Enables the reporting of network resource timings through `PerformanceObserver`.
*/
export const enableResourceTimingAPI: Getter<boolean> = createNativeFlagGetter('enableResourceTimingAPI', false);
/**
* Dispatches state updates synchronously in Fabric (e.g.: updates the scroll position in the shadow tree synchronously from the main thread).
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<7e9029f654b8454e5d0f878d3196341b>>
* @generated SignedSource<<3a195160a461f2a83201aeb1f9100513>>
* @flow strict
*/
@@ -46,8 +46,10 @@ export interface Spec extends TurboModule {
+enableLayoutAnimationsOnIOS?: () => boolean;
+enableMainQueueModulesOnIOS?: () => boolean;
+enableNativeCSSParsing?: () => boolean;
+enableNetworkEventReporting?: () => boolean;
+enableNewBackgroundAndBorderDrawables?: () => boolean;
+enablePropsUpdateReconciliationAndroid?: () => boolean;
+enableResourceTimingAPI?: () => boolean;
+enableSynchronousStateUpdates?: () => boolean;
+enableViewCulling?: () => boolean;
+enableViewRecycling?: () => boolean;