Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions packages/react-native/ReactCommon/jsinspector-modern/HostAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,26 @@ void HostAgent::handleRequest(const cdp::PreparsedRequest& req) {

shouldSendOKResponse = true;
isFinishedHandlingRequest = true;
} else if (req.method == "Tracing.start") {
// @cdp Tracing.start is implemented as a stub only.
frontendChannel_(cdp::jsonNotification(
// @cdp Tracing.bufferUsage is implemented as a stub only.
"Tracing.bufferUsage",
folly::dynamic::object("percentFull", 0)("eventCount", 0)("value", 0)));
shouldSendOKResponse = true;
isFinishedHandlingRequest = true;
} else if (req.method == "Tracing.end") {
// @cdp Tracing.end is implemented as a stub only.
frontendChannel_(cdp::jsonNotification(
// @cdp Tracing.dataCollected is implemented as a stub only.
"Tracing.dataCollected",
folly::dynamic::object("value", folly::dynamic::array())));
frontendChannel_(cdp::jsonNotification(
// @cdp Tracing.tracingComplete is implemented as a stub only.
"Tracing.tracingComplete",
folly::dynamic::object("dataLossOccurred", false)));
shouldSendOKResponse = true;
isFinishedHandlingRequest = true;
}

if (!isFinishedHandlingRequest && instanceAgent_ &&
Expand Down