Skip to content

Commit 117c623

Browse files
hoxyqfacebook-github-bot
authored andcommitted
Send custom CDP Event to Frontend to prepare for displaying a trace (facebook#53079)
Summary: # Changelog: [Internal] We need this to notify Frontend, so it updates the local state before receiving `Tracing.dataCollected` events. Corresponding change in CDT fork - facebook/react-native-devtools-frontend#199. Reviewed By: sbuggay Differential Revision: D79672598
1 parent a015ec6 commit 117c623

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/react-native/ReactCommon/jsinspector-modern/TracingAgent.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ TracingAgent::TracingAgent(
4444
sessionState_(sessionState),
4545
hostTargetController_(hostTargetController) {
4646
if (traceRecordingToEmit.has_value()) {
47+
frontendChannel_(
48+
cdp::jsonNotification("ReactNativeApplication.traceRequested"));
4749
emitTraceRecording(std::move(traceRecordingToEmit.value()));
4850
}
4951
}

0 commit comments

Comments
 (0)