Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1026)

Unified Diff: content/browser/devtools/worker_devtools_agent_host.cc

Issue 2500093002: [DevTools] Move IO and Tracing to new generator. (Closed)
Patch Set: roll Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/devtools/worker_devtools_agent_host.cc
diff --git a/content/browser/devtools/worker_devtools_agent_host.cc b/content/browser/devtools/worker_devtools_agent_host.cc
index 35276b809036dd488d3d660dd04365c1ceb110a9..fb45e6dd6dbdab11a42b05bea3f179b777ee2c86 100644
--- a/content/browser/devtools/worker_devtools_agent_host.cc
+++ b/content/browser/devtools/worker_devtools_agent_host.cc
@@ -5,6 +5,7 @@
#include "content/browser/devtools/worker_devtools_agent_host.h"
#include "base/guid.h"
+#include "base/json/json_reader.h"
#include "content/browser/devtools/devtools_protocol_handler.h"
#include "content/browser/devtools/devtools_session.h"
#include "content/browser/devtools/protocol/schema_handler.h"
@@ -47,11 +48,13 @@ bool WorkerDevToolsAgentHost::DispatchProtocolMessage(
if (state_ != WORKER_INSPECTED)
return true;
+ std::unique_ptr<base::Value> value = base::JSONReader::Read(message);
int call_id;
std::string method;
- if (protocol_handler_->HandleOptionalMessage(session()->session_id(), message,
- &call_id, &method))
+ if (protocol_handler_->HandleOptionalMessage(
+ session()->session_id(), std::move(value), &call_id, &method)) {
return true;
+ }
if (RenderProcessHost* host = RenderProcessHost::FromID(worker_id_.first)) {
host->Send(new DevToolsAgentMsg_DispatchOnInspectorBackend(

Powered by Google App Engine
This is Rietveld 408576698