From 80f340e81cba3d006704078e89cbccc17631c2b2 Mon Sep 17 00:00:00 2001 From: Ruslan Lesiutin Date: Fri, 22 Aug 2025 04:12:22 -0700 Subject: [PATCH] Send custom CDP Event to Frontend to prepare for displaying a trace (#53079) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53079 # Changelog: [Internal] We need this to notify Frontend, so it updates the local state before receiving `Tracing.dataCollected` events. Corresponding change in CDT fork - https://github.com/facebook/react-native-devtools-frontend/pull/199. Reviewed By: sbuggay Differential Revision: D79672598 fbshipit-source-id: b2928cb3942e34a1f4723516ecdf5062d4331591 --- .../ReactCommon/jsinspector-modern/TracingAgent.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-native/ReactCommon/jsinspector-modern/TracingAgent.cpp b/packages/react-native/ReactCommon/jsinspector-modern/TracingAgent.cpp index dd84991722f..c6ef7037227 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/TracingAgent.cpp +++ b/packages/react-native/ReactCommon/jsinspector-modern/TracingAgent.cpp @@ -44,6 +44,8 @@ TracingAgent::TracingAgent( sessionState_(sessionState), hostTargetController_(hostTargetController) { if (traceRecordingToEmit.has_value()) { + frontendChannel_( + cdp::jsonNotification("ReactNativeApplication.traceRequested")); emitTraceRecording(std::move(traceRecordingToEmit.value())); } }