| 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 ec77e2f16c390307259f4954d2c6537cb49241f4..35276b809036dd488d3d660dd04365c1ceb110a9 100644
|
| --- a/content/browser/devtools/worker_devtools_agent_host.cc
|
| +++ b/content/browser/devtools/worker_devtools_agent_host.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "base/guid.h"
|
| #include "content/browser/devtools/devtools_protocol_handler.h"
|
| +#include "content/browser/devtools/devtools_session.h"
|
| #include "content/browser/devtools/protocol/schema_handler.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/render_process_host.h"
|
| @@ -22,9 +23,10 @@ void WorkerDevToolsAgentHost::Attach() {
|
| state_ = WORKER_INSPECTED;
|
| AttachToWorker();
|
| }
|
| - if (RenderProcessHost* host = RenderProcessHost::FromID(worker_id_.first))
|
| - host->Send(
|
| - new DevToolsAgentMsg_Attach(worker_id_.second, GetId(), session_id()));
|
| + if (RenderProcessHost* host = RenderProcessHost::FromID(worker_id_.first)) {
|
| + host->Send(new DevToolsAgentMsg_Attach(
|
| + worker_id_.second, GetId(), session()->session_id()));
|
| + }
|
| OnAttachedStateChanged(true);
|
| }
|
|
|
| @@ -47,13 +49,13 @@ bool WorkerDevToolsAgentHost::DispatchProtocolMessage(
|
|
|
| int call_id;
|
| std::string method;
|
| - if (protocol_handler_->HandleOptionalMessage(session_id(), message, &call_id,
|
| - &method))
|
| + if (protocol_handler_->HandleOptionalMessage(session()->session_id(), message,
|
| + &call_id, &method))
|
| return true;
|
|
|
| if (RenderProcessHost* host = RenderProcessHost::FromID(worker_id_.first)) {
|
| host->Send(new DevToolsAgentMsg_DispatchOnInspectorBackend(
|
| - worker_id_.second, session_id(), call_id, method, message));
|
| + worker_id_.second, session()->session_id(), call_id, method, message));
|
| }
|
| return true;
|
| }
|
| @@ -86,7 +88,7 @@ void WorkerDevToolsAgentHost::WorkerReadyForInspection() {
|
| AttachToWorker();
|
| if (RenderProcessHost* host = RenderProcessHost::FromID(worker_id_.first)) {
|
| host->Send(new DevToolsAgentMsg_Reattach(
|
| - worker_id_.second, GetId(), session_id(),
|
| + worker_id_.second, GetId(), session()->session_id(),
|
| chunk_processor_.state_cookie()));
|
| }
|
| OnAttachedStateChanged(true);
|
|
|