diff --git a/packages/react-native/Libraries/Network/RCTNetworking.mm b/packages/react-native/Libraries/Network/RCTNetworking.mm index 1b52a960f633..c9d841e7468f 100644 --- a/packages/react-native/Libraries/Network/RCTNetworking.mm +++ b/packages/react-native/Libraries/Network/RCTNetworking.mm @@ -15,7 +15,6 @@ #import #import -#import #import "RCTInspectorNetworkReporter.h" #import "RCTNetworkPlugins.h" @@ -452,9 +451,7 @@ - (BOOL)canHandleRequest:(NSURLRequest *)request __weak RCTNetworkTask *weakTask = task; return ^{ [weakTask cancel]; - if (facebook::react::ReactNativeFeatureFlags::enableNetworkEventReporting()) { - [RCTInspectorNetworkReporter reportRequestFailed:devToolsRequestId cancelled:YES]; - } + [RCTInspectorNetworkReporter reportRequestFailed:devToolsRequestId cancelled:YES]; if (cancellationBlock) { cancellationBlock(); } @@ -574,19 +571,17 @@ - (void)sendData:(NSData *)data } } - if (facebook::react::ReactNativeFeatureFlags::enableNetworkEventReporting()) { - id responseDataForPreview; - if ([responseType isEqualToString:@"blob"]) { - responseDataForPreview = data; - } else if ([responseData isKindOfClass:[NSString class]]) { - responseDataForPreview = responseData; - } - bool base64Encoded = [responseType isEqualToString:@"base64"] || [responseType isEqualToString:@"blob"]; - - [RCTInspectorNetworkReporter maybeStoreResponseBody:task.devToolsRequestId - data:responseDataForPreview - base64Encoded:base64Encoded]; + id responseDataForPreview; + if ([responseType isEqualToString:@"blob"]) { + responseDataForPreview = data; + } else if ([responseData isKindOfClass:[NSString class]]) { + responseDataForPreview = responseData; } + bool base64Encoded = [responseType isEqualToString:@"base64"] || [responseType isEqualToString:@"blob"]; + + [RCTInspectorNetworkReporter maybeStoreResponseBody:task.devToolsRequestId + data:responseDataForPreview + base64Encoded:base64Encoded]; [self sendEventWithName:@"didReceiveNetworkData" body:@[ task.requestID, responseData ]]; } @@ -620,12 +615,10 @@ - (void)sendRequest:(NSURLRequest *)request id responseURL = response.URL ? response.URL.absoluteString : [NSNull null]; NSArray *responseJSON = @[ task.requestID, @(status), headers, responseURL ]; - if (facebook::react::ReactNativeFeatureFlags::enableNetworkEventReporting()) { - [RCTInspectorNetworkReporter reportResponseStart:task.devToolsRequestId - response:response - statusCode:status - headers:headers]; - } + [RCTInspectorNetworkReporter reportResponseStart:task.devToolsRequestId + response:response + statusCode:status + headers:headers]; [weakSelf sendEventWithName:@"didReceiveNetworkResponse" body:responseJSON]; }; @@ -660,10 +653,8 @@ - (void)sendRequest:(NSURLRequest *)request @(total) ]; - if (facebook::react::ReactNativeFeatureFlags::enableNetworkEventReporting()) { - [RCTInspectorNetworkReporter reportDataReceived:task.devToolsRequestId data:data]; - [RCTInspectorNetworkReporter maybeStoreResponseBodyIncremental:task.devToolsRequestId data:responseString]; - } + [RCTInspectorNetworkReporter reportDataReceived:task.devToolsRequestId data:data]; + [RCTInspectorNetworkReporter maybeStoreResponseBodyIncremental:task.devToolsRequestId data:responseString]; [weakSelf sendEventWithName:@"didReceiveNetworkIncrementalData" body:responseJSON]; }; } else { @@ -700,12 +691,10 @@ - (void)sendRequest:(NSURLRequest *)request NSArray *responseJSON = @[ task.requestID, RCTNullIfNil(error.localizedDescription), error.code == kCFURLErrorTimedOut ? @YES : @NO ]; - if (facebook::react::ReactNativeFeatureFlags::enableNetworkEventReporting()) { - if (error != nullptr) { - [RCTInspectorNetworkReporter reportRequestFailed:task.devToolsRequestId cancelled:NO]; - } else { - [RCTInspectorNetworkReporter reportResponseEnd:task.devToolsRequestId encodedDataLength:data.length]; - } + if (error != nullptr) { + [RCTInspectorNetworkReporter reportRequestFailed:task.devToolsRequestId cancelled:NO]; + } else { + [RCTInspectorNetworkReporter reportResponseEnd:task.devToolsRequestId encodedDataLength:data.length]; } [strongSelf sendEventWithName:@"didCompleteNetworkResponse" body:responseJSON]; [strongSelf->_tasksByRequestID removeObjectForKey:task.requestID]; @@ -723,12 +712,10 @@ - (void)sendRequest:(NSURLRequest *)request } _tasksByRequestID[task.requestID] = task; responseSender(@[ task.requestID ]); - if (facebook::react::ReactNativeFeatureFlags::enableNetworkEventReporting()) { - [RCTInspectorNetworkReporter reportRequestStart:task.devToolsRequestId - request:request - encodedDataLength:task.response.expectedContentLength]; - [RCTInspectorNetworkReporter reportConnectionTiming:task.devToolsRequestId request:task.request]; - } + [RCTInspectorNetworkReporter reportRequestStart:task.devToolsRequestId + request:request + encodedDataLength:task.response.expectedContentLength]; + [RCTInspectorNetworkReporter reportConnectionTiming:task.devToolsRequestId request:task.request]; } [task start]; diff --git a/packages/react-native/React/CoreModules/RCTInspectorWebSocketReporter.mm b/packages/react-native/React/CoreModules/RCTInspectorWebSocketReporter.mm index 511032ab25fb..7a47a85874aa 100644 --- a/packages/react-native/React/CoreModules/RCTInspectorWebSocketReporter.mm +++ b/packages/react-native/React/CoreModules/RCTInspectorWebSocketReporter.mm @@ -28,14 +28,14 @@ /** * Returns whether WebSocket events should be reported for the given request - * ID. Reporting requires the `enableNetworkEventReporting` and - * `fuseboxWebSocketEventsEnabled` feature flags, and a connected CDP debugger - * with the Network domain enabled (dev or profiling builds only). + * ID. Reporting requires the `fuseboxWebSocketEventsEnabled` feature flag, and + * a connected CDP debugger with the Network domain enabled (dev or profiling + * builds only). */ BOOL isReportingEnabled(NSString *requestId) { - return requestId != nil && ReactNativeFeatureFlags::enableNetworkEventReporting() && - ReactNativeFeatureFlags::fuseboxWebSocketEventsEnabled() && NetworkReporter::getInstance().isDebuggingEnabled(); + return requestId != nil && ReactNativeFeatureFlags::fuseboxWebSocketEventsEnabled() && + NetworkReporter::getInstance().isDebuggingEnabled(); } Headers convertNSDictionaryToHeaders(const NSDictionary *headers) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt index f028b7e4f7da..9ab11a814598 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt @@ -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<> + * @generated SignedSource<> */ /** @@ -264,12 +264,6 @@ public object ReactNativeFeatureFlags { @JvmStatic public fun enableNativeCSSParsing(): Boolean = accessor.enableNativeCSSParsing() - /** - * 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. - */ - @JvmStatic - public fun enableNetworkEventReporting(): Boolean = accessor.enableNetworkEventReporting() - /** * Enables caching text layout artifacts for later reuse */ @@ -378,12 +372,6 @@ public object ReactNativeFeatureFlags { @JvmStatic public fun fuseboxFrameRecordingEnabled(): Boolean = accessor.fuseboxFrameRecordingEnabled() - /** - * Enable network inspection support in the React Native DevTools CDP backend. This flag is global and should not be changed across React Host lifetimes. - */ - @JvmStatic - public fun fuseboxNetworkInspectionEnabled(): Boolean = accessor.fuseboxNetworkInspectionEnabled() - /** * Enable Page.captureScreenshot CDP method support in the React Native DevTools CDP backend. This flag is global and should not be changed across React Host lifetimes. */ @@ -391,7 +379,7 @@ public object ReactNativeFeatureFlags { public fun fuseboxScreenshotCaptureEnabled(): Boolean = accessor.fuseboxScreenshotCaptureEnabled() /** - * Enable reporting of WebSocket network events (`Network.webSocket*` CDP events) to the React Native DevTools CDP backend. Requires `fuseboxNetworkInspectionEnabled`. + * Enable reporting of WebSocket network events (`Network.webSocket*` CDP events) to the React Native DevTools CDP backend. */ @JvmStatic public fun fuseboxWebSocketEventsEnabled(): Boolean = accessor.fuseboxWebSocketEventsEnabled() diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt index 0e359509c73c..7785ae8a8a71 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt @@ -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<> + * @generated SignedSource<<628ede95c745280c1ceaa73c6dc45de0>> */ /** @@ -59,7 +59,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces private var enableModuleArgumentNSNullConversionIOSCache: Boolean? = null private var enableMutationObserverByDefaultCache: Boolean? = null private var enableNativeCSSParsingCache: Boolean? = null - private var enableNetworkEventReportingCache: Boolean? = null private var enablePreparedTextLayoutCache: Boolean? = null private var enablePropsUpdateReconciliationAndroidCache: Boolean? = null private var enableRuntimeSchedulerQueueClearingOnErrorCache: Boolean? = null @@ -78,7 +77,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces private var fuseboxAssertSingleHostStateCache: Boolean? = null private var fuseboxEnabledReleaseCache: Boolean? = null private var fuseboxFrameRecordingEnabledCache: Boolean? = null - private var fuseboxNetworkInspectionEnabledCache: Boolean? = null private var fuseboxScreenshotCaptureEnabledCache: Boolean? = null private var fuseboxWebSocketEventsEnabledCache: Boolean? = null private var optimizedAnimatedPropUpdatesCache: Boolean? = null @@ -459,15 +457,6 @@ 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 enablePreparedTextLayout(): Boolean { var cached = enablePreparedTextLayoutCache if (cached == null) { @@ -630,15 +619,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces return cached } - override fun fuseboxNetworkInspectionEnabled(): Boolean { - var cached = fuseboxNetworkInspectionEnabledCache - if (cached == null) { - cached = ReactNativeFeatureFlagsCxxInterop.fuseboxNetworkInspectionEnabled() - fuseboxNetworkInspectionEnabledCache = cached - } - return cached - } - override fun fuseboxScreenshotCaptureEnabled(): Boolean { var cached = fuseboxScreenshotCaptureEnabledCache if (cached == null) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt index dd081be14a65..6b59c5c2d90e 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt @@ -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<<87b76f5c2af82462dc66c7721cd66ac4>> + * @generated SignedSource<<6a0e60fe118f3651dc76c895a37fbce2>> */ /** @@ -106,8 +106,6 @@ public object ReactNativeFeatureFlagsCxxInterop { @DoNotStrip @JvmStatic public external fun enableNativeCSSParsing(): Boolean - @DoNotStrip @JvmStatic public external fun enableNetworkEventReporting(): Boolean - @DoNotStrip @JvmStatic public external fun enablePreparedTextLayout(): Boolean @DoNotStrip @JvmStatic public external fun enablePropsUpdateReconciliationAndroid(): Boolean @@ -144,8 +142,6 @@ public object ReactNativeFeatureFlagsCxxInterop { @DoNotStrip @JvmStatic public external fun fuseboxFrameRecordingEnabled(): Boolean - @DoNotStrip @JvmStatic public external fun fuseboxNetworkInspectionEnabled(): Boolean - @DoNotStrip @JvmStatic public external fun fuseboxScreenshotCaptureEnabled(): Boolean @DoNotStrip @JvmStatic public external fun fuseboxWebSocketEventsEnabled(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt index a229d0623440..fc8e25247c96 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt @@ -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<<8a117541421f413e517e1be1acf8be7d>> + * @generated SignedSource<<37e483d52d12a735e646c8ac06acb62c>> */ /** @@ -101,8 +101,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun enableNativeCSSParsing(): Boolean = false - override fun enableNetworkEventReporting(): Boolean = true - override fun enablePreparedTextLayout(): Boolean = false override fun enablePropsUpdateReconciliationAndroid(): Boolean = false @@ -139,8 +137,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun fuseboxFrameRecordingEnabled(): Boolean = false - override fun fuseboxNetworkInspectionEnabled(): Boolean = true - override fun fuseboxScreenshotCaptureEnabled(): Boolean = true override fun fuseboxWebSocketEventsEnabled(): Boolean = false diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt index c5786d397193..2469918dff4a 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt @@ -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<<9a2806b3934d130010954a92a7b48e0f>> + * @generated SignedSource<<5b7a6ca47ca43f473596e35dfced16e0>> */ /** @@ -63,7 +63,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc private var enableModuleArgumentNSNullConversionIOSCache: Boolean? = null private var enableMutationObserverByDefaultCache: Boolean? = null private var enableNativeCSSParsingCache: Boolean? = null - private var enableNetworkEventReportingCache: Boolean? = null private var enablePreparedTextLayoutCache: Boolean? = null private var enablePropsUpdateReconciliationAndroidCache: Boolean? = null private var enableRuntimeSchedulerQueueClearingOnErrorCache: Boolean? = null @@ -82,7 +81,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc private var fuseboxAssertSingleHostStateCache: Boolean? = null private var fuseboxEnabledReleaseCache: Boolean? = null private var fuseboxFrameRecordingEnabledCache: Boolean? = null - private var fuseboxNetworkInspectionEnabledCache: Boolean? = null private var fuseboxScreenshotCaptureEnabledCache: Boolean? = null private var fuseboxWebSocketEventsEnabledCache: Boolean? = null private var optimizedAnimatedPropUpdatesCache: Boolean? = null @@ -502,16 +500,6 @@ 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 enablePreparedTextLayout(): Boolean { var cached = enablePreparedTextLayoutCache if (cached == null) { @@ -692,16 +680,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc return cached } - override fun fuseboxNetworkInspectionEnabled(): Boolean { - var cached = fuseboxNetworkInspectionEnabledCache - if (cached == null) { - cached = currentProvider.fuseboxNetworkInspectionEnabled() - accessedFeatureFlags.add("fuseboxNetworkInspectionEnabled") - fuseboxNetworkInspectionEnabledCache = cached - } - return cached - } - override fun fuseboxScreenshotCaptureEnabled(): Boolean { var cached = fuseboxScreenshotCaptureEnabledCache if (cached == null) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt index 2a6da8129f50..3282cdad209c 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt @@ -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<<49c76b8072c1bd29135086c9e0a5da2f>> + * @generated SignedSource<> */ /** @@ -101,8 +101,6 @@ public interface ReactNativeFeatureFlagsProvider { @DoNotStrip public fun enableNativeCSSParsing(): Boolean - @DoNotStrip public fun enableNetworkEventReporting(): Boolean - @DoNotStrip public fun enablePreparedTextLayout(): Boolean @DoNotStrip public fun enablePropsUpdateReconciliationAndroid(): Boolean @@ -139,8 +137,6 @@ public interface ReactNativeFeatureFlagsProvider { @DoNotStrip public fun fuseboxFrameRecordingEnabled(): Boolean - @DoNotStrip public fun fuseboxNetworkInspectionEnabled(): Boolean - @DoNotStrip public fun fuseboxScreenshotCaptureEnabled(): Boolean @DoNotStrip public fun fuseboxWebSocketEventsEnabled(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkEventUtil.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkEventUtil.kt index dbb0d746ad21..39518f7342c1 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkEventUtil.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkEventUtil.kt @@ -15,7 +15,6 @@ import com.facebook.react.bridge.Arguments import com.facebook.react.bridge.ReactApplicationContext import com.facebook.react.bridge.WritableMap import com.facebook.react.bridge.buildReadableArray -import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags import java.io.IOException import java.net.SocketTimeoutException import okhttp3.Headers @@ -39,17 +38,15 @@ internal object NetworkEventUtil { requestBodyForDevTools: String?, encodedDataLength: Long, ) { - if (ReactNativeFeatureFlags.enableNetworkEventReporting()) { - InspectorNetworkReporter.reportRequestStart( - devToolsRequestId, - requestUrl, - requestMethod, - requestHeaders, - requestBodyForDevTools.orEmpty(), - encodedDataLength, - ) - InspectorNetworkReporter.reportConnectionTiming(devToolsRequestId, requestHeaders) - } + InspectorNetworkReporter.reportRequestStart( + devToolsRequestId, + requestUrl, + requestMethod, + requestHeaders, + requestBodyForDevTools.orEmpty(), + encodedDataLength, + ) + InspectorNetworkReporter.reportConnectionTiming(devToolsRequestId, requestHeaders) } @JvmStatic @@ -78,7 +75,7 @@ internal object NetworkEventUtil { progress: Long, total: Long, ) { - if (ReactNativeFeatureFlags.enableNetworkEventReporting() && data != null) { + if (data != null) { InspectorNetworkReporter.reportDataReceived(devToolsRequestId, data) InspectorNetworkReporter.maybeStoreResponseBodyIncremental(devToolsRequestId, data) } @@ -118,13 +115,11 @@ internal object NetworkEventUtil { data: String?, responseType: String, ) { - if (ReactNativeFeatureFlags.enableNetworkEventReporting()) { - InspectorNetworkReporter.maybeStoreResponseBody( - devToolsRequestId, - data.orEmpty(), - responseType == "base64", - ) - } + InspectorNetworkReporter.maybeStoreResponseBody( + devToolsRequestId, + data.orEmpty(), + responseType == "base64", + ) reactContext?.emitDeviceEvent( "didReceiveNetworkData", buildReadableArray { @@ -142,13 +137,11 @@ internal object NetworkEventUtil { data: WritableMap, rawData: ByteArray, ) { - if (ReactNativeFeatureFlags.enableNetworkEventReporting()) { - InspectorNetworkReporter.maybeStoreResponseBody( - devToolsRequestId, - Base64.encodeToString(rawData, Base64.NO_WRAP), - true, - ) - } + InspectorNetworkReporter.maybeStoreResponseBody( + devToolsRequestId, + Base64.encodeToString(rawData, Base64.NO_WRAP), + true, + ) reactContext?.emitDeviceEvent( "didReceiveNetworkData", Arguments.createArray().apply { @@ -166,9 +159,7 @@ internal object NetworkEventUtil { error: String?, e: Throwable?, ) { - if (ReactNativeFeatureFlags.enableNetworkEventReporting()) { - InspectorNetworkReporter.reportRequestFailed(devToolsRequestId, false) - } + InspectorNetworkReporter.reportRequestFailed(devToolsRequestId, false) reactContext?.emitDeviceEvent( "didCompleteNetworkResponse", buildReadableArray { @@ -188,9 +179,7 @@ internal object NetworkEventUtil { devToolsRequestId: String, encodedDataLength: Long, ) { - if (ReactNativeFeatureFlags.enableNetworkEventReporting()) { - InspectorNetworkReporter.reportResponseEnd(devToolsRequestId, encodedDataLength) - } + InspectorNetworkReporter.reportResponseEnd(devToolsRequestId, encodedDataLength) reactContext?.emitDeviceEvent( "didCompleteNetworkResponse", buildReadableArray { @@ -215,15 +204,13 @@ internal object NetworkEventUtil { headersBundle.putString(headerName, headerValue) } - if (ReactNativeFeatureFlags.enableNetworkEventReporting()) { - InspectorNetworkReporter.reportResponseStart( - devToolsRequestId, - requestUrl.orEmpty(), - statusCode, - headers, - contentLength, - ) - } + InspectorNetworkReporter.reportResponseStart( + devToolsRequestId, + requestUrl.orEmpty(), + statusCode, + headers, + contentLength, + ) reactContext?.emitDeviceEvent( "didReceiveNetworkResponse", Arguments.createArray().apply { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.kt index dd9ad8c57021..e6b127058f2c 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.kt @@ -69,8 +69,7 @@ public class WebSocketModule(context: ReactApplicationContext) : /** Whether WebSocket events should be reported to the modern debugger server. */ private fun isInspectorNetworkReportingEnabled(): Boolean = - ReactNativeFeatureFlags.enableNetworkEventReporting() && - ReactNativeFeatureFlags.fuseboxWebSocketEventsEnabled() + ReactNativeFeatureFlags.fuseboxWebSocketEventsEnabled() /** * Run [block] with the connection's CDP request ID, when WebSocket event reporting to the modern diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp index 349c5ad6a541..e2cd698aed25 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp @@ -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<<42f1901c8b7cb568cc761a791991a333>> + * @generated SignedSource<<41ff49e9305aa1ff144582dfcac650d0>> */ /** @@ -273,12 +273,6 @@ class ReactNativeFeatureFlagsJavaProvider return method(javaProvider_); } - bool enableNetworkEventReporting() override { - static const auto method = - getReactNativeFeatureFlagsProviderJavaClass()->getMethod("enableNetworkEventReporting"); - return method(javaProvider_); - } - bool enablePreparedTextLayout() override { static const auto method = getReactNativeFeatureFlagsProviderJavaClass()->getMethod("enablePreparedTextLayout"); @@ -387,12 +381,6 @@ class ReactNativeFeatureFlagsJavaProvider return method(javaProvider_); } - bool fuseboxNetworkInspectionEnabled() override { - static const auto method = - getReactNativeFeatureFlagsProviderJavaClass()->getMethod("fuseboxNetworkInspectionEnabled"); - return method(javaProvider_); - } - bool fuseboxScreenshotCaptureEnabled() override { static const auto method = getReactNativeFeatureFlagsProviderJavaClass()->getMethod("fuseboxScreenshotCaptureEnabled"); @@ -760,11 +748,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enableNativeCSSParsing( return ReactNativeFeatureFlags::enableNativeCSSParsing(); } -bool JReactNativeFeatureFlagsCxxInterop::enableNetworkEventReporting( - facebook::jni::alias_ref /*unused*/) { - return ReactNativeFeatureFlags::enableNetworkEventReporting(); -} - bool JReactNativeFeatureFlagsCxxInterop::enablePreparedTextLayout( facebook::jni::alias_ref /*unused*/) { return ReactNativeFeatureFlags::enablePreparedTextLayout(); @@ -855,11 +838,6 @@ bool JReactNativeFeatureFlagsCxxInterop::fuseboxFrameRecordingEnabled( return ReactNativeFeatureFlags::fuseboxFrameRecordingEnabled(); } -bool JReactNativeFeatureFlagsCxxInterop::fuseboxNetworkInspectionEnabled( - facebook::jni::alias_ref /*unused*/) { - return ReactNativeFeatureFlags::fuseboxNetworkInspectionEnabled(); -} - bool JReactNativeFeatureFlagsCxxInterop::fuseboxScreenshotCaptureEnabled( facebook::jni::alias_ref /*unused*/) { return ReactNativeFeatureFlags::fuseboxScreenshotCaptureEnabled(); @@ -1148,9 +1126,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() { makeNativeMethod( "enableNativeCSSParsing", JReactNativeFeatureFlagsCxxInterop::enableNativeCSSParsing), - makeNativeMethod( - "enableNetworkEventReporting", - JReactNativeFeatureFlagsCxxInterop::enableNetworkEventReporting), makeNativeMethod( "enablePreparedTextLayout", JReactNativeFeatureFlagsCxxInterop::enablePreparedTextLayout), @@ -1205,9 +1180,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() { makeNativeMethod( "fuseboxFrameRecordingEnabled", JReactNativeFeatureFlagsCxxInterop::fuseboxFrameRecordingEnabled), - makeNativeMethod( - "fuseboxNetworkInspectionEnabled", - JReactNativeFeatureFlagsCxxInterop::fuseboxNetworkInspectionEnabled), makeNativeMethod( "fuseboxScreenshotCaptureEnabled", JReactNativeFeatureFlagsCxxInterop::fuseboxScreenshotCaptureEnabled), diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h index 6ffc3146e658..6e30545c9062 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h @@ -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<<9967d87b794ba46797ed78a845683dc7>> + * @generated SignedSource<<9c5bd61122f068c919c70399828585d1>> */ /** @@ -147,9 +147,6 @@ class JReactNativeFeatureFlagsCxxInterop static bool enableNativeCSSParsing( facebook::jni::alias_ref); - static bool enableNetworkEventReporting( - facebook::jni::alias_ref); - static bool enablePreparedTextLayout( facebook::jni::alias_ref); @@ -204,9 +201,6 @@ class JReactNativeFeatureFlagsCxxInterop static bool fuseboxFrameRecordingEnabled( facebook::jni::alias_ref); - static bool fuseboxNetworkInspectionEnabled( - facebook::jni::alias_ref); - static bool fuseboxScreenshotCaptureEnabled( facebook::jni::alias_ref); diff --git a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/network/NetworkEventUtilTest.kt b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/network/NetworkEventUtilTest.kt index 1f3cc38b19c8..b1937945a76a 100644 --- a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/network/NetworkEventUtilTest.kt +++ b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/network/NetworkEventUtilTest.kt @@ -13,17 +13,15 @@ import com.facebook.react.bridge.Arguments import com.facebook.react.bridge.ReactApplicationContext import com.facebook.react.bridge.WritableArray import com.facebook.react.bridge.WritableMap -import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags -import com.facebook.react.internal.featureflags.ReactNativeFeatureFlagsDefaults -import com.facebook.react.internal.featureflags.ReactNativeFeatureFlagsForTests import com.facebook.testutils.shadows.ShadowArguments +import com.facebook.testutils.shadows.ShadowInspectorNetworkReporter +import com.facebook.testutils.shadows.ShadowSoLoader import java.io.ByteArrayInputStream import java.net.SocketTimeoutException import okhttp3.MediaType import okhttp3.MultipartBody import okhttp3.RequestBody import org.assertj.core.api.Assertions.assertThat -import org.junit.After import org.junit.Before import org.junit.Test import org.junit.runner.RunWith @@ -35,7 +33,9 @@ import org.mockito.kotlin.verify import org.robolectric.RobolectricTestRunner import org.robolectric.annotation.Config -@Config(shadows = [ShadowArguments::class]) +@Config( + shadows = [ShadowArguments::class, ShadowSoLoader::class, ShadowInspectorNetworkReporter::class] +) @RunWith(RobolectricTestRunner::class) class NetworkEventUtilTest { private lateinit var reactContext: ReactApplicationContext @@ -43,18 +43,6 @@ class NetworkEventUtilTest { @Before fun setUp() { reactContext = mock() - - ReactNativeFeatureFlagsForTests.setUp() - ReactNativeFeatureFlags.override( - object : ReactNativeFeatureFlagsDefaults() { - override fun enableNetworkEventReporting(): Boolean = false - } - ) - } - - @After - fun tearDown() { - ReactNativeFeatureFlags.dangerouslyReset() } @Test diff --git a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/network/NetworkingModuleTest.kt b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/network/NetworkingModuleTest.kt index 29a1acedb893..b8b6555bd8f3 100644 --- a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/network/NetworkingModuleTest.kt +++ b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/network/NetworkingModuleTest.kt @@ -17,10 +17,9 @@ import com.facebook.react.bridge.ReactApplicationContext import com.facebook.react.bridge.WritableArray import com.facebook.react.bridge.WritableMap import com.facebook.react.common.network.OkHttpCallUtil -import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags -import com.facebook.react.internal.featureflags.ReactNativeFeatureFlagsDefaults -import com.facebook.react.internal.featureflags.ReactNativeFeatureFlagsForTests import com.facebook.testutils.shadows.ShadowArguments +import com.facebook.testutils.shadows.ShadowInspectorNetworkReporter +import com.facebook.testutils.shadows.ShadowSoLoader import java.io.IOException import java.io.InputStream import java.nio.charset.StandardCharsets @@ -54,7 +53,9 @@ import org.robolectric.RobolectricTestRunner import org.robolectric.annotation.Config /** Tests [NetworkingModule] */ -@Config(shadows = [ShadowArguments::class]) +@Config( + shadows = [ShadowArguments::class, ShadowSoLoader::class, ShadowInspectorNetworkReporter::class] +) @RunWith(RobolectricTestRunner::class) class NetworkingModuleTest { @@ -78,13 +79,6 @@ class NetworkingModuleTest { context = mock() whenever(context.hasActiveReactInstance()).thenReturn(true) - ReactNativeFeatureFlagsForTests.setUp() - ReactNativeFeatureFlags.override( - object : ReactNativeFeatureFlagsDefaults() { - override fun enableNetworkEventReporting(): Boolean = false - } - ) - networkingModule = NetworkingModule(context, "", httpClient, null) okHttpCallUtil = mockStatic(OkHttpCallUtil::class.java) diff --git a/packages/react-native/ReactAndroid/src/test/java/com/facebook/testutils/shadows/ShadowInspectorNetworkReporter.kt b/packages/react-native/ReactAndroid/src/test/java/com/facebook/testutils/shadows/ShadowInspectorNetworkReporter.kt new file mode 100644 index 000000000000..1267f847b451 --- /dev/null +++ b/packages/react-native/ReactAndroid/src/test/java/com/facebook/testutils/shadows/ShadowInspectorNetworkReporter.kt @@ -0,0 +1,54 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package com.facebook.testutils.shadows + +import org.robolectric.annotation.Implementation +import org.robolectric.annotation.Implements + +/** + * Robolectric shadow that stubs out `InspectorNetworkReporter`'s JNI methods, so that tests + * exercising `NetworkEventUtil` do not attempt to call into the `react_devsupportjni` native + * library. `isDebuggingEnabled` returns `false`, which also short-circuits the reporting wrappers + * that guard on it (e.g. `reportDataReceived`, `maybeStoreResponseBody`). + */ +@Suppress("UNUSED_PARAMETER") +@Implements(className = "com.facebook.react.modules.network.InspectorNetworkReporter") +class ShadowInspectorNetworkReporter { + companion object { + @JvmStatic @Implementation fun isDebuggingEnabled(): Boolean = false + + @JvmStatic + @Implementation + fun reportRequestStart( + requestId: String, + requestUrl: String, + requestMethod: String, + requestHeaders: Map, + requestBody: String, + encodedDataLength: Long, + ) {} + + @JvmStatic + @Implementation + fun reportConnectionTiming(requestId: String, headers: Map) {} + + @JvmStatic + @Implementation + fun reportResponseStart( + requestId: String, + requestUrl: String, + responseStatus: Int, + responseHeaders: Map, + expectedDataLength: Long, + ) {} + + @JvmStatic @Implementation fun reportResponseEnd(requestId: String, encodedDataLength: Long) {} + + @JvmStatic @Implementation fun reportRequestFailed(requestId: String, cancelled: Boolean) {} + } +} diff --git a/packages/react-native/ReactCommon/jsinspector-modern/HostAgent.cpp b/packages/react-native/ReactCommon/jsinspector-modern/HostAgent.cpp index daef4edc43e2..d15c37d6609a 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/HostAgent.cpp +++ b/packages/react-native/ReactCommon/jsinspector-modern/HostAgent.cpp @@ -148,36 +148,34 @@ class HostAgent::Impl final { .shouldSendOKResponse = true, }; } - if (InspectorFlags::getInstance().getNetworkInspectionEnabled()) { - if (req.method == "Network.enable") { - auto& inspector = getInspectorInstance(); - if (inspector.getSystemState().registeredHostsCount > 1) { - frontendChannel_( - cdp::jsonError( - req.id, - cdp::ErrorCode::InternalError, - "The Network domain is unavailable when multiple React Native hosts are registered.")); - return { - .isFinishedHandlingRequest = true, - .shouldSendOKResponse = false, - }; - } - - sessionState_.isNetworkDomainEnabled = true; - + if (req.method == "Network.enable") { + auto& inspector = getInspectorInstance(); + if (inspector.getSystemState().registeredHostsCount > 1) { + frontendChannel_( + cdp::jsonError( + req.id, + cdp::ErrorCode::InternalError, + "The Network domain is unavailable when multiple React Native hosts are registered.")); return { - .isFinishedHandlingRequest = false, - .shouldSendOKResponse = true, + .isFinishedHandlingRequest = true, + .shouldSendOKResponse = false, }; } - if (req.method == "Network.disable") { - sessionState_.isNetworkDomainEnabled = false; - return { - .isFinishedHandlingRequest = false, - .shouldSendOKResponse = true, - }; - } + sessionState_.isNetworkDomainEnabled = true; + + return { + .isFinishedHandlingRequest = false, + .shouldSendOKResponse = true, + }; + } + if (req.method == "Network.disable") { + sessionState_.isNetworkDomainEnabled = false; + + return { + .isFinishedHandlingRequest = false, + .shouldSendOKResponse = true, + }; } // Methods other than domain enables/disables: handle anything we know how diff --git a/packages/react-native/ReactCommon/jsinspector-modern/HostTarget.cpp b/packages/react-native/ReactCommon/jsinspector-modern/HostTarget.cpp index 637198d2a57e..236debd0b819 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/HostTarget.cpp +++ b/packages/react-native/ReactCommon/jsinspector-modern/HostTarget.cpp @@ -336,7 +336,7 @@ StaticHostTargetMetadata getStaticHostMetadata() { return { .isProfilingBuild = inspectorFlags.getIsProfilingBuild(), - .networkInspectionEnabled = inspectorFlags.getNetworkInspectionEnabled(), + .networkInspectionEnabled = true, .frameRecordingEnabled = inspectorFlags.getFrameRecordingEnabled()}; } diff --git a/packages/react-native/ReactCommon/jsinspector-modern/InspectorFlags.cpp b/packages/react-native/ReactCommon/jsinspector-modern/InspectorFlags.cpp index 59cae70d8b70..ac8474640b56 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/InspectorFlags.cpp +++ b/packages/react-native/ReactCommon/jsinspector-modern/InspectorFlags.cpp @@ -41,10 +41,6 @@ bool InspectorFlags::getIsProfilingBuild() const { return loadFlagsAndAssertUnchanged().isProfilingBuild; } -bool InspectorFlags::getNetworkInspectionEnabled() const { - return loadFlagsAndAssertUnchanged().networkInspectionEnabled; -} - bool InspectorFlags::getPerfIssuesEnabled() const { return loadFlagsAndAssertUnchanged().perfIssuesEnabled; } @@ -81,8 +77,6 @@ const InspectorFlags::Values& InspectorFlags::loadFlagsAndAssertUnchanged() #else false, #endif - .networkInspectionEnabled = - ReactNativeFeatureFlags::fuseboxNetworkInspectionEnabled(), .perfIssuesEnabled = ReactNativeFeatureFlags::perfIssuesEnabled(), }; diff --git a/packages/react-native/ReactCommon/jsinspector-modern/InspectorFlags.h b/packages/react-native/ReactCommon/jsinspector-modern/InspectorFlags.h index 60b452687e1a..5cbe81978b9b 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/InspectorFlags.h +++ b/packages/react-native/ReactCommon/jsinspector-modern/InspectorFlags.h @@ -50,11 +50,6 @@ class InspectorFlags { */ bool getFrameRecordingEnabled() const; - /** - * Flag determining if network inspection is enabled. - */ - bool getNetworkInspectionEnabled() const; - /** * Flag determining if the V2 in-app Performance Monitor is enabled. */ @@ -79,7 +74,6 @@ class InspectorFlags { bool frameRecordingEnabled; bool fuseboxEnabled; bool isProfilingBuild; - bool networkInspectionEnabled; bool perfIssuesEnabled; bool operator==(const Values &) const = default; }; diff --git a/packages/react-native/ReactCommon/jsinspector-modern/NetworkIOAgent.cpp b/packages/react-native/ReactCommon/jsinspector-modern/NetworkIOAgent.cpp index ba7447baa230..41f90e3845e7 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/NetworkIOAgent.cpp +++ b/packages/react-native/ReactCommon/jsinspector-modern/NetworkIOAgent.cpp @@ -280,31 +280,29 @@ bool NetworkIOAgent::handleRequest( return true; } - if (InspectorFlags::getInstance().getNetworkInspectionEnabled()) { - auto& networkHandler = NetworkHandler::getInstance(); - - // @cdp Network.enable support is experimental. - if (req.method == "Network.enable") { - networkAgentId_ = networkHandler.enableAgent(frontendChannel_); - // NOTE: Domain enable/disable responses are sent by HostAgent. - return false; - } + auto& networkHandler = NetworkHandler::getInstance(); - // @cdp Network.disable support is experimental. - if (req.method == "Network.disable") { - if (networkAgentId_) { - networkHandler.disableAgent(*networkAgentId_); - networkAgentId_ = std::nullopt; - } - // NOTE: Domain enable/disable responses are sent by HostAgent. - return false; - } + // @cdp Network.enable support is experimental. + if (req.method == "Network.enable") { + networkAgentId_ = networkHandler.enableAgent(frontendChannel_); + // NOTE: Domain enable/disable responses are sent by HostAgent. + return false; + } - // @cdp Network.getResponseBody support is experimental. - if (req.method == "Network.getResponseBody") { - handleGetResponseBody(req); - return true; + // @cdp Network.disable support is experimental. + if (req.method == "Network.disable") { + if (networkAgentId_) { + networkHandler.disableAgent(*networkAgentId_); + networkAgentId_ = std::nullopt; } + // NOTE: Domain enable/disable responses are sent by HostAgent. + return false; + } + + // @cdp Network.getResponseBody support is experimental. + if (req.method == "Network.getResponseBody") { + handleGetResponseBody(req); + return true; } return false; diff --git a/packages/react-native/ReactCommon/jsinspector-modern/RuntimeTargetNetwork.cpp b/packages/react-native/ReactCommon/jsinspector-modern/RuntimeTargetNetwork.cpp index 62f1fc011641..506b0f9f74d1 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/RuntimeTargetNetwork.cpp +++ b/packages/react-native/ReactCommon/jsinspector-modern/RuntimeTargetNetwork.cpp @@ -41,9 +41,6 @@ Object objectFreeze(Runtime& runtime, Object object) { } // namespace void RuntimeTarget::installNetworkReporterAPI() { - if (!InspectorFlags::getInstance().getNetworkInspectionEnabled()) { - return; - } auto jsiCreateDevToolsRequestId = [selfWeak = weak_from_this()]( Runtime& runtime, const Value& /*thisVal*/, diff --git a/packages/react-native/ReactCommon/jsinspector-modern/tests/NetworkReporterTest.cpp b/packages/react-native/ReactCommon/jsinspector-modern/tests/NetworkReporterTest.cpp index d99fcc43261c..2d6f8dc4e2c4 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/tests/NetworkReporterTest.cpp +++ b/packages/react-native/ReactCommon/jsinspector-modern/tests/NetworkReporterTest.cpp @@ -19,9 +19,7 @@ namespace facebook::react::jsinspector_modern { namespace { -struct NetworkReporterTestParams { - bool enableNetworkEventReporting; -}; +struct NetworkReporterTestParams {}; } // namespace @@ -36,13 +34,7 @@ class NetworkReporterTestBase : public TracingTestBase< folly::QueuedImmediateExecutor>, public WithParamInterface { protected: - NetworkReporterTestBase() - : TracingTestBase({ - .enableNetworkEventReporting = - WithParamInterface::GetParam() - .enableNetworkEventReporting, - .networkInspectionEnabled = true, - }) {} + NetworkReporterTestBase() : TracingTestBase(InspectorFlagOverrides{}) {} void SetUp() override { JsiIntegrationPortableTestBase::SetUp(); @@ -803,13 +795,10 @@ TEST_P(NetworkReporterTest, testTwoSessionsReceiveNetworkEvents) { } struct NetworkReporterTracingTestParams { - bool enableNetworkEventReporting; bool enableNetworkDomain; operator NetworkReporterTestParams() const { - return NetworkReporterTestParams{ - .enableNetworkEventReporting = enableNetworkEventReporting, - }; + return NetworkReporterTestParams{}; } }; @@ -982,19 +971,12 @@ TEST_P( AtJsonPtr("/args/data/didFail", false)))); } -static const auto networkReporterTestParamValues = testing::Values( - NetworkReporterTestParams{.enableNetworkEventReporting = true}, - NetworkReporterTestParams{ - .enableNetworkEventReporting = false, - }); +static const auto networkReporterTestParamValues = + testing::Values(NetworkReporterTestParams{}); static const auto networkReporterTracingTestParamValues = testing::Values( - NetworkReporterTracingTestParams{ - .enableNetworkEventReporting = true, - .enableNetworkDomain = true}, - NetworkReporterTracingTestParams{ - .enableNetworkEventReporting = true, - .enableNetworkDomain = false}); + NetworkReporterTracingTestParams{.enableNetworkDomain = true}, + NetworkReporterTracingTestParams{.enableNetworkDomain = false}); INSTANTIATE_TEST_SUITE_P( NetworkReporterTest, diff --git a/packages/react-native/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.cpp b/packages/react-native/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.cpp index 6dcdcd696991..47f738837ef5 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.cpp +++ b/packages/react-native/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.cpp @@ -41,16 +41,6 @@ class ReactNativeFeatureFlagsOverrides ReactNativeFeatureFlagsDefaults::fuseboxFrameRecordingEnabled()); } - bool fuseboxNetworkInspectionEnabled() override { - return overrides_.networkInspectionEnabled.value_or( - ReactNativeFeatureFlagsDefaults::fuseboxNetworkInspectionEnabled()); - } - - bool enableNetworkEventReporting() override { - return overrides_.enableNetworkEventReporting.value_or( - ReactNativeFeatureFlagsDefaults::enableNetworkEventReporting()); - } - private: InspectorFlagOverrides overrides_; }; diff --git a/packages/react-native/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.h b/packages/react-native/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.h index 12122b3f2d72..9648e7c4345b 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.h +++ b/packages/react-native/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.h @@ -20,10 +20,8 @@ struct InspectorFlagOverrides { // NOTE: Keep these entries in sync with ReactNativeFeatureFlagsOverrides in // the implementation file. std::optional screenshotCaptureEnabled; - std::optional enableNetworkEventReporting; std::optional frameRecordingEnabled; std::optional fuseboxEnabledRelease; - std::optional networkInspectionEnabled; }; /** diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp index 31d61b5cb247..be68d0a22c60 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp @@ -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<<6f2362e9844cab731ca01e4af563fde9>> + * @generated SignedSource<<77401595559dc52e1b2b206527deb341>> */ /** @@ -182,10 +182,6 @@ bool ReactNativeFeatureFlags::enableNativeCSSParsing() { return getAccessor().enableNativeCSSParsing(); } -bool ReactNativeFeatureFlags::enableNetworkEventReporting() { - return getAccessor().enableNetworkEventReporting(); -} - bool ReactNativeFeatureFlags::enablePreparedTextLayout() { return getAccessor().enablePreparedTextLayout(); } @@ -258,10 +254,6 @@ bool ReactNativeFeatureFlags::fuseboxFrameRecordingEnabled() { return getAccessor().fuseboxFrameRecordingEnabled(); } -bool ReactNativeFeatureFlags::fuseboxNetworkInspectionEnabled() { - return getAccessor().fuseboxNetworkInspectionEnabled(); -} - bool ReactNativeFeatureFlags::fuseboxScreenshotCaptureEnabled() { return getAccessor().fuseboxScreenshotCaptureEnabled(); } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h index 344997745dac..d8beb4efeb9e 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h @@ -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<> + * @generated SignedSource<> */ /** @@ -234,11 +234,6 @@ class ReactNativeFeatureFlags { */ RN_EXPORT static bool enableNativeCSSParsing(); - /** - * 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. - */ - RN_EXPORT static bool enableNetworkEventReporting(); - /** * Enables caching text layout artifacts for later reuse */ @@ -329,18 +324,13 @@ class ReactNativeFeatureFlags { */ RN_EXPORT static bool fuseboxFrameRecordingEnabled(); - /** - * Enable network inspection support in the React Native DevTools CDP backend. This flag is global and should not be changed across React Host lifetimes. - */ - RN_EXPORT static bool fuseboxNetworkInspectionEnabled(); - /** * Enable Page.captureScreenshot CDP method support in the React Native DevTools CDP backend. This flag is global and should not be changed across React Host lifetimes. */ RN_EXPORT static bool fuseboxScreenshotCaptureEnabled(); /** - * Enable reporting of WebSocket network events (`Network.webSocket*` CDP events) to the React Native DevTools CDP backend. Requires `fuseboxNetworkInspectionEnabled`. + * Enable reporting of WebSocket network events (`Network.webSocket*` CDP events) to the React Native DevTools CDP backend. */ RN_EXPORT static bool fuseboxWebSocketEventsEnabled(); diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp index eef175da896e..0e0d92b2b19f 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp @@ -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<<4c6a965958d151f22574bc85a6714c11>> + * @generated SignedSource<<4b3689511d39c0ba8e1d78f34df7d348>> */ /** @@ -731,24 +731,6 @@ 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(39, "enableNetworkEventReporting"); - - flagValue = currentProvider_->enableNetworkEventReporting(); - enableNetworkEventReporting_ = flagValue; - } - - return flagValue.value(); -} - bool ReactNativeFeatureFlagsAccessor::enablePreparedTextLayout() { auto flagValue = enablePreparedTextLayout_.load(); @@ -758,7 +740,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePreparedTextLayout() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(40, "enablePreparedTextLayout"); + markFlagAsAccessed(39, "enablePreparedTextLayout"); flagValue = currentProvider_->enablePreparedTextLayout(); enablePreparedTextLayout_ = flagValue; @@ -776,7 +758,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(41, "enablePropsUpdateReconciliationAndroid"); + markFlagAsAccessed(40, "enablePropsUpdateReconciliationAndroid"); flagValue = currentProvider_->enablePropsUpdateReconciliationAndroid(); enablePropsUpdateReconciliationAndroid_ = flagValue; @@ -794,7 +776,7 @@ bool ReactNativeFeatureFlagsAccessor::enableRuntimeSchedulerQueueClearingOnError // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(42, "enableRuntimeSchedulerQueueClearingOnError"); + markFlagAsAccessed(41, "enableRuntimeSchedulerQueueClearingOnError"); flagValue = currentProvider_->enableRuntimeSchedulerQueueClearingOnError(); enableRuntimeSchedulerQueueClearingOnError_ = flagValue; @@ -812,7 +794,7 @@ bool ReactNativeFeatureFlagsAccessor::enableSchedulerDelegateInvalidation() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(43, "enableSchedulerDelegateInvalidation"); + markFlagAsAccessed(42, "enableSchedulerDelegateInvalidation"); flagValue = currentProvider_->enableSchedulerDelegateInvalidation(); enableSchedulerDelegateInvalidation_ = flagValue; @@ -830,7 +812,7 @@ bool ReactNativeFeatureFlagsAccessor::enableSwiftUIBasedFilters() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(44, "enableSwiftUIBasedFilters"); + markFlagAsAccessed(43, "enableSwiftUIBasedFilters"); flagValue = currentProvider_->enableSwiftUIBasedFilters(); enableSwiftUIBasedFilters_ = flagValue; @@ -848,7 +830,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(45, "enableViewCulling"); + markFlagAsAccessed(44, "enableViewCulling"); flagValue = currentProvider_->enableViewCulling(); enableViewCulling_ = flagValue; @@ -866,7 +848,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(46, "enableViewRecycling"); + markFlagAsAccessed(45, "enableViewRecycling"); flagValue = currentProvider_->enableViewRecycling(); enableViewRecycling_ = flagValue; @@ -884,7 +866,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForImage() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(47, "enableViewRecyclingForImage"); + markFlagAsAccessed(46, "enableViewRecyclingForImage"); flagValue = currentProvider_->enableViewRecyclingForImage(); enableViewRecyclingForImage_ = flagValue; @@ -902,7 +884,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForScrollView() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(48, "enableViewRecyclingForScrollView"); + markFlagAsAccessed(47, "enableViewRecyclingForScrollView"); flagValue = currentProvider_->enableViewRecyclingForScrollView(); enableViewRecyclingForScrollView_ = flagValue; @@ -920,7 +902,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(49, "enableViewRecyclingForText"); + markFlagAsAccessed(48, "enableViewRecyclingForText"); flagValue = currentProvider_->enableViewRecyclingForText(); enableViewRecyclingForText_ = flagValue; @@ -938,7 +920,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(50, "enableViewRecyclingForView"); + markFlagAsAccessed(49, "enableViewRecyclingForView"); flagValue = currentProvider_->enableViewRecyclingForView(); enableViewRecyclingForView_ = flagValue; @@ -956,7 +938,7 @@ bool ReactNativeFeatureFlagsAccessor::enableVirtualViewContainerStateExperimenta // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(51, "enableVirtualViewContainerStateExperimental"); + markFlagAsAccessed(50, "enableVirtualViewContainerStateExperimental"); flagValue = currentProvider_->enableVirtualViewContainerStateExperimental(); enableVirtualViewContainerStateExperimental_ = flagValue; @@ -974,7 +956,7 @@ bool ReactNativeFeatureFlagsAccessor::fixDifferentiatorParentTagForUnflattenCase // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(52, "fixDifferentiatorParentTagForUnflattenCase"); + markFlagAsAccessed(51, "fixDifferentiatorParentTagForUnflattenCase"); flagValue = currentProvider_->fixDifferentiatorParentTagForUnflattenCase(); fixDifferentiatorParentTagForUnflattenCase_ = flagValue; @@ -992,7 +974,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(53, "fixMappingOfEventPrioritiesBetweenFabricAndReact"); + markFlagAsAccessed(52, "fixMappingOfEventPrioritiesBetweenFabricAndReact"); flagValue = currentProvider_->fixMappingOfEventPrioritiesBetweenFabricAndReact(); fixMappingOfEventPrioritiesBetweenFabricAndReact_ = flagValue; @@ -1010,7 +992,7 @@ bool ReactNativeFeatureFlagsAccessor::fixYogaFlexBasisFitContentInMainAxis() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(54, "fixYogaFlexBasisFitContentInMainAxis"); + markFlagAsAccessed(53, "fixYogaFlexBasisFitContentInMainAxis"); flagValue = currentProvider_->fixYogaFlexBasisFitContentInMainAxis(); fixYogaFlexBasisFitContentInMainAxis_ = flagValue; @@ -1028,7 +1010,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxAssertSingleHostState() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(55, "fuseboxAssertSingleHostState"); + markFlagAsAccessed(54, "fuseboxAssertSingleHostState"); flagValue = currentProvider_->fuseboxAssertSingleHostState(); fuseboxAssertSingleHostState_ = flagValue; @@ -1046,7 +1028,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(56, "fuseboxEnabledRelease"); + markFlagAsAccessed(55, "fuseboxEnabledRelease"); flagValue = currentProvider_->fuseboxEnabledRelease(); fuseboxEnabledRelease_ = flagValue; @@ -1064,7 +1046,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxFrameRecordingEnabled() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(57, "fuseboxFrameRecordingEnabled"); + markFlagAsAccessed(56, "fuseboxFrameRecordingEnabled"); flagValue = currentProvider_->fuseboxFrameRecordingEnabled(); fuseboxFrameRecordingEnabled_ = flagValue; @@ -1073,24 +1055,6 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxFrameRecordingEnabled() { return flagValue.value(); } -bool ReactNativeFeatureFlagsAccessor::fuseboxNetworkInspectionEnabled() { - auto flagValue = fuseboxNetworkInspectionEnabled_.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(58, "fuseboxNetworkInspectionEnabled"); - - flagValue = currentProvider_->fuseboxNetworkInspectionEnabled(); - fuseboxNetworkInspectionEnabled_ = flagValue; - } - - return flagValue.value(); -} - bool ReactNativeFeatureFlagsAccessor::fuseboxScreenshotCaptureEnabled() { auto flagValue = fuseboxScreenshotCaptureEnabled_.load(); @@ -1100,7 +1064,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxScreenshotCaptureEnabled() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(59, "fuseboxScreenshotCaptureEnabled"); + markFlagAsAccessed(57, "fuseboxScreenshotCaptureEnabled"); flagValue = currentProvider_->fuseboxScreenshotCaptureEnabled(); fuseboxScreenshotCaptureEnabled_ = flagValue; @@ -1118,7 +1082,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxWebSocketEventsEnabled() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(60, "fuseboxWebSocketEventsEnabled"); + markFlagAsAccessed(58, "fuseboxWebSocketEventsEnabled"); flagValue = currentProvider_->fuseboxWebSocketEventsEnabled(); fuseboxWebSocketEventsEnabled_ = flagValue; @@ -1136,7 +1100,7 @@ bool ReactNativeFeatureFlagsAccessor::optimizedAnimatedPropUpdates() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(61, "optimizedAnimatedPropUpdates"); + markFlagAsAccessed(59, "optimizedAnimatedPropUpdates"); flagValue = currentProvider_->optimizedAnimatedPropUpdates(); optimizedAnimatedPropUpdates_ = flagValue; @@ -1154,7 +1118,7 @@ bool ReactNativeFeatureFlagsAccessor::overrideBySynchronousMountPropsAtMountingA // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(62, "overrideBySynchronousMountPropsAtMountingAndroid"); + markFlagAsAccessed(60, "overrideBySynchronousMountPropsAtMountingAndroid"); flagValue = currentProvider_->overrideBySynchronousMountPropsAtMountingAndroid(); overrideBySynchronousMountPropsAtMountingAndroid_ = flagValue; @@ -1172,7 +1136,7 @@ bool ReactNativeFeatureFlagsAccessor::perfIssuesEnabled() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(63, "perfIssuesEnabled"); + markFlagAsAccessed(61, "perfIssuesEnabled"); flagValue = currentProvider_->perfIssuesEnabled(); perfIssuesEnabled_ = flagValue; @@ -1190,7 +1154,7 @@ bool ReactNativeFeatureFlagsAccessor::perfMonitorV2Enabled() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(64, "perfMonitorV2Enabled"); + markFlagAsAccessed(62, "perfMonitorV2Enabled"); flagValue = currentProvider_->perfMonitorV2Enabled(); perfMonitorV2Enabled_ = flagValue; @@ -1208,7 +1172,7 @@ double ReactNativeFeatureFlagsAccessor::preparedTextCacheSize() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(65, "preparedTextCacheSize"); + markFlagAsAccessed(63, "preparedTextCacheSize"); flagValue = currentProvider_->preparedTextCacheSize(); preparedTextCacheSize_ = flagValue; @@ -1226,7 +1190,7 @@ bool ReactNativeFeatureFlagsAccessor::preventShadowTreeCommitExhaustion() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(66, "preventShadowTreeCommitExhaustion"); + markFlagAsAccessed(64, "preventShadowTreeCommitExhaustion"); flagValue = currentProvider_->preventShadowTreeCommitExhaustion(); preventShadowTreeCommitExhaustion_ = flagValue; @@ -1244,7 +1208,7 @@ bool ReactNativeFeatureFlagsAccessor::redBoxV2Android() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(67, "redBoxV2Android"); + markFlagAsAccessed(65, "redBoxV2Android"); flagValue = currentProvider_->redBoxV2Android(); redBoxV2Android_ = flagValue; @@ -1262,7 +1226,7 @@ bool ReactNativeFeatureFlagsAccessor::redBoxV2IOS() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(68, "redBoxV2IOS"); + markFlagAsAccessed(66, "redBoxV2IOS"); flagValue = currentProvider_->redBoxV2IOS(); redBoxV2IOS_ = flagValue; @@ -1280,7 +1244,7 @@ bool ReactNativeFeatureFlagsAccessor::shouldPressibilityUseW3CPointerEventsForHo // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(69, "shouldPressibilityUseW3CPointerEventsForHover"); + markFlagAsAccessed(67, "shouldPressibilityUseW3CPointerEventsForHover"); flagValue = currentProvider_->shouldPressibilityUseW3CPointerEventsForHover(); shouldPressibilityUseW3CPointerEventsForHover_ = flagValue; @@ -1298,7 +1262,7 @@ bool ReactNativeFeatureFlagsAccessor::shouldTriggerResponderTransferOnScrollAndr // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(70, "shouldTriggerResponderTransferOnScrollAndroid"); + markFlagAsAccessed(68, "shouldTriggerResponderTransferOnScrollAndroid"); flagValue = currentProvider_->shouldTriggerResponderTransferOnScrollAndroid(); shouldTriggerResponderTransferOnScrollAndroid_ = flagValue; @@ -1316,7 +1280,7 @@ bool ReactNativeFeatureFlagsAccessor::skipActivityIdentityAssertionOnHostPause() // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(71, "skipActivityIdentityAssertionOnHostPause"); + markFlagAsAccessed(69, "skipActivityIdentityAssertionOnHostPause"); flagValue = currentProvider_->skipActivityIdentityAssertionOnHostPause(); skipActivityIdentityAssertionOnHostPause_ = flagValue; @@ -1334,7 +1298,7 @@ bool ReactNativeFeatureFlagsAccessor::syncAndroidClipBoundsWithOverflow() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(72, "syncAndroidClipBoundsWithOverflow"); + markFlagAsAccessed(70, "syncAndroidClipBoundsWithOverflow"); flagValue = currentProvider_->syncAndroidClipBoundsWithOverflow(); syncAndroidClipBoundsWithOverflow_ = flagValue; @@ -1352,7 +1316,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(73, "traceTurboModulePromiseRejectionsOnAndroid"); + markFlagAsAccessed(71, "traceTurboModulePromiseRejectionsOnAndroid"); flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid(); traceTurboModulePromiseRejectionsOnAndroid_ = flagValue; @@ -1370,7 +1334,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(74, "updateRuntimeShadowNodeReferencesOnCommit"); + markFlagAsAccessed(72, "updateRuntimeShadowNodeReferencesOnCommit"); flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit(); updateRuntimeShadowNodeReferencesOnCommit_ = flagValue; @@ -1388,7 +1352,7 @@ bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommitT // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(75, "updateRuntimeShadowNodeReferencesOnCommitThread"); + markFlagAsAccessed(73, "updateRuntimeShadowNodeReferencesOnCommitThread"); flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommitThread(); updateRuntimeShadowNodeReferencesOnCommitThread_ = flagValue; @@ -1406,7 +1370,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(76, "useAlwaysAvailableJSErrorHandling"); + markFlagAsAccessed(74, "useAlwaysAvailableJSErrorHandling"); flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling(); useAlwaysAvailableJSErrorHandling_ = flagValue; @@ -1424,7 +1388,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(77, "useFabricInterop"); + markFlagAsAccessed(75, "useFabricInterop"); flagValue = currentProvider_->useFabricInterop(); useFabricInterop_ = flagValue; @@ -1442,7 +1406,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(78, "useNativeViewConfigsInBridgelessMode"); + markFlagAsAccessed(76, "useNativeViewConfigsInBridgelessMode"); flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode(); useNativeViewConfigsInBridgelessMode_ = flagValue; @@ -1460,7 +1424,7 @@ bool ReactNativeFeatureFlagsAccessor::useNestedScrollViewAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(79, "useNestedScrollViewAndroid"); + markFlagAsAccessed(77, "useNestedScrollViewAndroid"); flagValue = currentProvider_->useNestedScrollViewAndroid(); useNestedScrollViewAndroid_ = flagValue; @@ -1478,7 +1442,7 @@ bool ReactNativeFeatureFlagsAccessor::useSharedAnimatedBackend() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(80, "useSharedAnimatedBackend"); + markFlagAsAccessed(78, "useSharedAnimatedBackend"); flagValue = currentProvider_->useSharedAnimatedBackend(); useSharedAnimatedBackend_ = flagValue; @@ -1496,7 +1460,7 @@ bool ReactNativeFeatureFlagsAccessor::useTraitHiddenOnAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(81, "useTraitHiddenOnAndroid"); + markFlagAsAccessed(79, "useTraitHiddenOnAndroid"); flagValue = currentProvider_->useTraitHiddenOnAndroid(); useTraitHiddenOnAndroid_ = flagValue; @@ -1514,7 +1478,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(82, "useTurboModuleInterop"); + markFlagAsAccessed(80, "useTurboModuleInterop"); flagValue = currentProvider_->useTurboModuleInterop(); useTurboModuleInterop_ = flagValue; @@ -1532,7 +1496,7 @@ double ReactNativeFeatureFlagsAccessor::viewCullingOutsetRatio() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(83, "viewCullingOutsetRatio"); + markFlagAsAccessed(81, "viewCullingOutsetRatio"); flagValue = currentProvider_->viewCullingOutsetRatio(); viewCullingOutsetRatio_ = flagValue; @@ -1550,7 +1514,7 @@ bool ReactNativeFeatureFlagsAccessor::viewTransitionEnabled() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(84, "viewTransitionEnabled"); + markFlagAsAccessed(82, "viewTransitionEnabled"); flagValue = currentProvider_->viewTransitionEnabled(); viewTransitionEnabled_ = flagValue; @@ -1568,7 +1532,7 @@ bool ReactNativeFeatureFlagsAccessor::viewTransitionUseHardwareBitmapAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(85, "viewTransitionUseHardwareBitmapAndroid"); + markFlagAsAccessed(83, "viewTransitionUseHardwareBitmapAndroid"); flagValue = currentProvider_->viewTransitionUseHardwareBitmapAndroid(); viewTransitionUseHardwareBitmapAndroid_ = flagValue; @@ -1586,7 +1550,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewPrerenderRatio() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(86, "virtualViewPrerenderRatio"); + markFlagAsAccessed(84, "virtualViewPrerenderRatio"); flagValue = currentProvider_->virtualViewPrerenderRatio(); virtualViewPrerenderRatio_ = flagValue; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h index 6a67566e46cc..7e81ac322346 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h @@ -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<> + * @generated SignedSource<> */ /** @@ -71,7 +71,6 @@ class ReactNativeFeatureFlagsAccessor { bool enableModuleArgumentNSNullConversionIOS(); bool enableMutationObserverByDefault(); bool enableNativeCSSParsing(); - bool enableNetworkEventReporting(); bool enablePreparedTextLayout(); bool enablePropsUpdateReconciliationAndroid(); bool enableRuntimeSchedulerQueueClearingOnError(); @@ -90,7 +89,6 @@ class ReactNativeFeatureFlagsAccessor { bool fuseboxAssertSingleHostState(); bool fuseboxEnabledRelease(); bool fuseboxFrameRecordingEnabled(); - bool fuseboxNetworkInspectionEnabled(); bool fuseboxScreenshotCaptureEnabled(); bool fuseboxWebSocketEventsEnabled(); bool optimizedAnimatedPropUpdates(); @@ -130,7 +128,7 @@ class ReactNativeFeatureFlagsAccessor { std::unique_ptr currentProvider_; bool wasOverridden_; - std::array, 87> accessedFeatureFlags_; + std::array, 85> accessedFeatureFlags_; std::atomic> commonTestFlag_; std::atomic> cdpInteractionMetricsEnabled_; @@ -171,7 +169,6 @@ class ReactNativeFeatureFlagsAccessor { std::atomic> enableModuleArgumentNSNullConversionIOS_; std::atomic> enableMutationObserverByDefault_; std::atomic> enableNativeCSSParsing_; - std::atomic> enableNetworkEventReporting_; std::atomic> enablePreparedTextLayout_; std::atomic> enablePropsUpdateReconciliationAndroid_; std::atomic> enableRuntimeSchedulerQueueClearingOnError_; @@ -190,7 +187,6 @@ class ReactNativeFeatureFlagsAccessor { std::atomic> fuseboxAssertSingleHostState_; std::atomic> fuseboxEnabledRelease_; std::atomic> fuseboxFrameRecordingEnabled_; - std::atomic> fuseboxNetworkInspectionEnabled_; std::atomic> fuseboxScreenshotCaptureEnabled_; std::atomic> fuseboxWebSocketEventsEnabled_; std::atomic> optimizedAnimatedPropUpdates_; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h index 03a6d1bc9328..d3fd47faff98 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h @@ -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<<96887197bdbba2c13e11046b73572e56>> + * @generated SignedSource<> */ /** @@ -183,10 +183,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider { return false; } - bool enableNetworkEventReporting() override { - return true; - } - bool enablePreparedTextLayout() override { return false; } @@ -259,10 +255,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider { return false; } - bool fuseboxNetworkInspectionEnabled() override { - return true; - } - bool fuseboxScreenshotCaptureEnabled() override { return true; } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h index 940811f0174c..10f61382198a 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h @@ -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<> + * @generated SignedSource<<518b44f36bbff8631afae71847c943f0>> */ /** @@ -396,15 +396,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef return ReactNativeFeatureFlagsDefaults::enableNativeCSSParsing(); } - bool enableNetworkEventReporting() override { - auto value = values_["enableNetworkEventReporting"]; - if (!value.isNull()) { - return value.getBool(); - } - - return ReactNativeFeatureFlagsDefaults::enableNetworkEventReporting(); - } - bool enablePreparedTextLayout() override { auto value = values_["enablePreparedTextLayout"]; if (!value.isNull()) { @@ -567,15 +558,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef return ReactNativeFeatureFlagsDefaults::fuseboxFrameRecordingEnabled(); } - bool fuseboxNetworkInspectionEnabled() override { - auto value = values_["fuseboxNetworkInspectionEnabled"]; - if (!value.isNull()) { - return value.getBool(); - } - - return ReactNativeFeatureFlagsDefaults::fuseboxNetworkInspectionEnabled(); - } - bool fuseboxScreenshotCaptureEnabled() override { auto value = values_["fuseboxScreenshotCaptureEnabled"]; if (!value.isNull()) { diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h index d80700290554..6c39114c9f24 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h @@ -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<<2d4757d38664169286dacd779b0e267a>> + * @generated SignedSource<<31a9106d7fbb65a6bf61b87e23ba93e0>> */ /** @@ -64,7 +64,6 @@ class ReactNativeFeatureFlagsProvider { virtual bool enableModuleArgumentNSNullConversionIOS() = 0; virtual bool enableMutationObserverByDefault() = 0; virtual bool enableNativeCSSParsing() = 0; - virtual bool enableNetworkEventReporting() = 0; virtual bool enablePreparedTextLayout() = 0; virtual bool enablePropsUpdateReconciliationAndroid() = 0; virtual bool enableRuntimeSchedulerQueueClearingOnError() = 0; @@ -83,7 +82,6 @@ class ReactNativeFeatureFlagsProvider { virtual bool fuseboxAssertSingleHostState() = 0; virtual bool fuseboxEnabledRelease() = 0; virtual bool fuseboxFrameRecordingEnabled() = 0; - virtual bool fuseboxNetworkInspectionEnabled() = 0; virtual bool fuseboxScreenshotCaptureEnabled() = 0; virtual bool fuseboxWebSocketEventsEnabled() = 0; virtual bool optimizedAnimatedPropUpdates() = 0; diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp index 2490fdbd5be5..6e3de67d0d3b 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp @@ -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<<2a0a030bafa14c6f20691f029703a642>> + * @generated SignedSource<> */ /** @@ -239,11 +239,6 @@ bool NativeReactNativeFeatureFlags::enableNativeCSSParsing( return ReactNativeFeatureFlags::enableNativeCSSParsing(); } -bool NativeReactNativeFeatureFlags::enableNetworkEventReporting( - jsi::Runtime& /*runtime*/) { - return ReactNativeFeatureFlags::enableNetworkEventReporting(); -} - bool NativeReactNativeFeatureFlags::enablePreparedTextLayout( jsi::Runtime& /*runtime*/) { return ReactNativeFeatureFlags::enablePreparedTextLayout(); @@ -334,11 +329,6 @@ bool NativeReactNativeFeatureFlags::fuseboxFrameRecordingEnabled( return ReactNativeFeatureFlags::fuseboxFrameRecordingEnabled(); } -bool NativeReactNativeFeatureFlags::fuseboxNetworkInspectionEnabled( - jsi::Runtime& /*runtime*/) { - return ReactNativeFeatureFlags::fuseboxNetworkInspectionEnabled(); -} - bool NativeReactNativeFeatureFlags::fuseboxScreenshotCaptureEnabled( jsi::Runtime& /*runtime*/) { return ReactNativeFeatureFlags::fuseboxScreenshotCaptureEnabled(); diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h index 7d07e49ad1ba..b6f92a94e61a 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h @@ -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<<206f5586c0ea22387a48a484d6d96f54>> + * @generated SignedSource<<31af47566a5543079cc3b09567033a57>> */ /** @@ -114,8 +114,6 @@ class NativeReactNativeFeatureFlags bool enableNativeCSSParsing(jsi::Runtime& runtime); - bool enableNetworkEventReporting(jsi::Runtime& runtime); - bool enablePreparedTextLayout(jsi::Runtime& runtime); bool enablePropsUpdateReconciliationAndroid(jsi::Runtime& runtime); @@ -152,8 +150,6 @@ class NativeReactNativeFeatureFlags bool fuseboxFrameRecordingEnabled(jsi::Runtime& runtime); - bool fuseboxNetworkInspectionEnabled(jsi::Runtime& runtime); - bool fuseboxScreenshotCaptureEnabled(jsi::Runtime& runtime); bool fuseboxWebSocketEventsEnabled(jsi::Runtime& runtime); diff --git a/packages/react-native/ReactCommon/react/performance/timeline/PerformanceEntryReporter.cpp b/packages/react-native/ReactCommon/react/performance/timeline/PerformanceEntryReporter.cpp index 1e839df71332..94ee08362c0c 100644 --- a/packages/react-native/ReactCommon/react/performance/timeline/PerformanceEntryReporter.cpp +++ b/packages/react-native/ReactCommon/react/performance/timeline/PerformanceEntryReporter.cpp @@ -29,12 +29,9 @@ std::vector getSupportedEntryTypesInternal() { PerformanceEntryType::MEASURE, PerformanceEntryType::EVENT, PerformanceEntryType::LONGTASK, + PerformanceEntryType::RESOURCE, }; - if (ReactNativeFeatureFlags::enableNetworkEventReporting()) { - supportedEntryTypes.emplace_back(PerformanceEntryType::RESOURCE); - } - return supportedEntryTypes; } diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index 66eb0d254429..857abb9f7cd4 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -463,16 +463,6 @@ const definitions: FeatureFlagDefinitions = { }, ossReleaseStage: 'none', }, - enableNetworkEventReporting: { - defaultValue: true, - metadata: { - description: - '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.', - expectedReleaseValue: true, - purpose: 'release', - }, - ossReleaseStage: 'none', - }, enablePreparedTextLayout: { defaultValue: false, metadata: { @@ -668,17 +658,6 @@ const definitions: FeatureFlagDefinitions = { }, ossReleaseStage: 'experimental', }, - fuseboxNetworkInspectionEnabled: { - defaultValue: true, - metadata: { - dateAdded: '2024-01-31', - description: - 'Enable network inspection support in the React Native DevTools CDP backend. This flag is global and should not be changed across React Host lifetimes.', - expectedReleaseValue: true, - purpose: 'experimentation', - }, - ossReleaseStage: 'none', - }, fuseboxScreenshotCaptureEnabled: { defaultValue: true, metadata: { @@ -695,7 +674,7 @@ const definitions: FeatureFlagDefinitions = { metadata: { dateAdded: '2026-07-11', description: - 'Enable reporting of WebSocket network events (`Network.webSocket*` CDP events) to the React Native DevTools CDP backend. Requires `fuseboxNetworkInspectionEnabled`.', + 'Enable reporting of WebSocket network events (`Network.webSocket*` CDP events) to the React Native DevTools CDP backend.', expectedReleaseValue: true, purpose: 'experimentation', }, diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index dda2b802b271..81b25c3d0bd9 100644 --- a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js @@ -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<> + * @generated SignedSource<<18f24b20806682b774fa5ba96f291fd2>> * @flow strict * @noformat */ @@ -87,7 +87,6 @@ export type ReactNativeFeatureFlags = Readonly<{ enableModuleArgumentNSNullConversionIOS: Getter, enableMutationObserverByDefault: Getter, enableNativeCSSParsing: Getter, - enableNetworkEventReporting: Getter, enablePreparedTextLayout: Getter, enablePropsUpdateReconciliationAndroid: Getter, enableRuntimeSchedulerQueueClearingOnError: Getter, @@ -106,7 +105,6 @@ export type ReactNativeFeatureFlags = Readonly<{ fuseboxAssertSingleHostState: Getter, fuseboxEnabledRelease: Getter, fuseboxFrameRecordingEnabled: Getter, - fuseboxNetworkInspectionEnabled: Getter, fuseboxScreenshotCaptureEnabled: Getter, fuseboxWebSocketEventsEnabled: Getter, optimizedAnimatedPropUpdates: Getter, @@ -362,10 +360,6 @@ export const enableMutationObserverByDefault: Getter = createNativeFlag * Parse CSS strings using the Fabric CSS parser instead of ViewConfig processing */ export const enableNativeCSSParsing: Getter = createNativeFlagGetter('enableNativeCSSParsing', false); -/** - * 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. - */ -export const enableNetworkEventReporting: Getter = createNativeFlagGetter('enableNetworkEventReporting', true); /** * Enables caching text layout artifacts for later reuse */ @@ -438,16 +432,12 @@ export const fuseboxEnabledRelease: Getter = createNativeFlagGetter('fu * Enable frame timings and screenshots support in the React Native DevTools CDP backend. This flag is global and should not be changed across React Host lifetimes. */ export const fuseboxFrameRecordingEnabled: Getter = createNativeFlagGetter('fuseboxFrameRecordingEnabled', false); -/** - * Enable network inspection support in the React Native DevTools CDP backend. This flag is global and should not be changed across React Host lifetimes. - */ -export const fuseboxNetworkInspectionEnabled: Getter = createNativeFlagGetter('fuseboxNetworkInspectionEnabled', true); /** * Enable Page.captureScreenshot CDP method support in the React Native DevTools CDP backend. This flag is global and should not be changed across React Host lifetimes. */ export const fuseboxScreenshotCaptureEnabled: Getter = createNativeFlagGetter('fuseboxScreenshotCaptureEnabled', true); /** - * Enable reporting of WebSocket network events (`Network.webSocket*` CDP events) to the React Native DevTools CDP backend. Requires `fuseboxNetworkInspectionEnabled`. + * Enable reporting of WebSocket network events (`Network.webSocket*` CDP events) to the React Native DevTools CDP backend. */ export const fuseboxWebSocketEventsEnabled: Getter = createNativeFlagGetter('fuseboxWebSocketEventsEnabled', false); /** diff --git a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js index 67ae1cb7d8a1..fde1df2ce4ff 100644 --- a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js @@ -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<<4dd4bbc51723d64c94a8e7ba1bf67bf1>> + * @generated SignedSource<<848355c91c5827383c35686d975ebb08>> * @flow strict * @noformat */ @@ -64,7 +64,6 @@ export interface Spec extends TurboModule { readonly enableModuleArgumentNSNullConversionIOS?: () => boolean; readonly enableMutationObserverByDefault?: () => boolean; readonly enableNativeCSSParsing?: () => boolean; - readonly enableNetworkEventReporting?: () => boolean; readonly enablePreparedTextLayout?: () => boolean; readonly enablePropsUpdateReconciliationAndroid?: () => boolean; readonly enableRuntimeSchedulerQueueClearingOnError?: () => boolean; @@ -83,7 +82,6 @@ export interface Spec extends TurboModule { readonly fuseboxAssertSingleHostState?: () => boolean; readonly fuseboxEnabledRelease?: () => boolean; readonly fuseboxFrameRecordingEnabled?: () => boolean; - readonly fuseboxNetworkInspectionEnabled?: () => boolean; readonly fuseboxScreenshotCaptureEnabled?: () => boolean; readonly fuseboxWebSocketEventsEnabled?: () => boolean; readonly optimizedAnimatedPropUpdates?: () => boolean; diff --git a/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api index dcf221dac974..0b9990f9ce0b 100644 --- a/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api @@ -10676,7 +10676,6 @@ class facebook::react::jsinspector_modern::InspectorFlags { public bool getFrameRecordingEnabled() const; public bool getFuseboxEnabled() const; public bool getIsProfilingBuild() const; - public bool getNetworkInspectionEnabled() const; public bool getPerfIssuesEnabled() const; public bool getScreenshotCaptureEnabled() const; public facebook::react::jsinspector_modern::InspectorFlags& operator=(const facebook::react::jsinspector_modern::InspectorFlags&) = delete; diff --git a/scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api index 5c35c3b0f39f..173716f8789b 100644 --- a/scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api @@ -10299,7 +10299,6 @@ class facebook::react::jsinspector_modern::InspectorFlags { public bool getFrameRecordingEnabled() const; public bool getFuseboxEnabled() const; public bool getIsProfilingBuild() const; - public bool getNetworkInspectionEnabled() const; public bool getPerfIssuesEnabled() const; public bool getScreenshotCaptureEnabled() const; public facebook::react::jsinspector_modern::InspectorFlags& operator=(const facebook::react::jsinspector_modern::InspectorFlags&) = delete; diff --git a/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api index f0acc551bb18..3a77c8af8ef4 100644 --- a/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api @@ -10529,7 +10529,6 @@ class facebook::react::jsinspector_modern::InspectorFlags { public bool getFrameRecordingEnabled() const; public bool getFuseboxEnabled() const; public bool getIsProfilingBuild() const; - public bool getNetworkInspectionEnabled() const; public bool getPerfIssuesEnabled() const; public bool getScreenshotCaptureEnabled() const; public facebook::react::jsinspector_modern::InspectorFlags& operator=(const facebook::react::jsinspector_modern::InspectorFlags&) = delete; diff --git a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api index de18e199e774..cf4482d03cf4 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api @@ -12585,7 +12585,6 @@ class facebook::react::jsinspector_modern::InspectorFlags { public bool getFrameRecordingEnabled() const; public bool getFuseboxEnabled() const; public bool getIsProfilingBuild() const; - public bool getNetworkInspectionEnabled() const; public bool getPerfIssuesEnabled() const; public bool getScreenshotCaptureEnabled() const; public facebook::react::jsinspector_modern::InspectorFlags& operator=(const facebook::react::jsinspector_modern::InspectorFlags&) = delete; diff --git a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api index 3d2428683ae3..e000669b44b8 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api @@ -12270,7 +12270,6 @@ class facebook::react::jsinspector_modern::InspectorFlags { public bool getFrameRecordingEnabled() const; public bool getFuseboxEnabled() const; public bool getIsProfilingBuild() const; - public bool getNetworkInspectionEnabled() const; public bool getPerfIssuesEnabled() const; public bool getScreenshotCaptureEnabled() const; public facebook::react::jsinspector_modern::InspectorFlags& operator=(const facebook::react::jsinspector_modern::InspectorFlags&) = delete; diff --git a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api index a24cb26ab17a..a4ffb330b075 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api @@ -12448,7 +12448,6 @@ class facebook::react::jsinspector_modern::InspectorFlags { public bool getFrameRecordingEnabled() const; public bool getFuseboxEnabled() const; public bool getIsProfilingBuild() const; - public bool getNetworkInspectionEnabled() const; public bool getPerfIssuesEnabled() const; public bool getScreenshotCaptureEnabled() const; public facebook::react::jsinspector_modern::InspectorFlags& operator=(const facebook::react::jsinspector_modern::InspectorFlags&) = delete; diff --git a/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api index 56d20f0b002e..665141942618 100644 --- a/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api @@ -7740,7 +7740,6 @@ class facebook::react::jsinspector_modern::InspectorFlags { public bool getFrameRecordingEnabled() const; public bool getFuseboxEnabled() const; public bool getIsProfilingBuild() const; - public bool getNetworkInspectionEnabled() const; public bool getPerfIssuesEnabled() const; public bool getScreenshotCaptureEnabled() const; public facebook::react::jsinspector_modern::InspectorFlags& operator=(const facebook::react::jsinspector_modern::InspectorFlags&) = delete; diff --git a/scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api index d898e370e8fa..e89ee55ae6d6 100644 --- a/scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api @@ -7565,7 +7565,6 @@ class facebook::react::jsinspector_modern::InspectorFlags { public bool getFrameRecordingEnabled() const; public bool getFuseboxEnabled() const; public bool getIsProfilingBuild() const; - public bool getNetworkInspectionEnabled() const; public bool getPerfIssuesEnabled() const; public bool getScreenshotCaptureEnabled() const; public facebook::react::jsinspector_modern::InspectorFlags& operator=(const facebook::react::jsinspector_modern::InspectorFlags&) = delete; diff --git a/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api index d2eb086c932c..7b1d2605e1fe 100644 --- a/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api @@ -7731,7 +7731,6 @@ class facebook::react::jsinspector_modern::InspectorFlags { public bool getFrameRecordingEnabled() const; public bool getFuseboxEnabled() const; public bool getIsProfilingBuild() const; - public bool getNetworkInspectionEnabled() const; public bool getPerfIssuesEnabled() const; public bool getScreenshotCaptureEnabled() const; public facebook::react::jsinspector_modern::InspectorFlags& operator=(const facebook::react::jsinspector_modern::InspectorFlags&) = delete;