| 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 2839937066504a8ba21af4b7e08690b502f77dcb..b8f8cd994729999341a71d8d1d2794564126e2f5 100644
|
| --- a/content/browser/devtools/worker_devtools_agent_host.cc
|
| +++ b/content/browser/devtools/worker_devtools_agent_host.cc
|
| @@ -107,12 +107,10 @@ void WorkerDevToolsAgentHost::WorkerReadyForInspection() {
|
| state_ = WORKER_INSPECTED;
|
| AttachToWorker();
|
| if (RenderProcessHost* host = RenderProcessHost::FromID(worker_id_.first)) {
|
| - std::string state_cookie;
|
| - auto it = chunk_processors_.find(session()->session_id());
|
| - if (it != chunk_processors_.end())
|
| - state_cookie = it->second->state_cookie();
|
| - host->Send(new DevToolsAgentMsg_Reattach(
|
| - worker_id_.second, GetId(), session()->session_id(), state_cookie));
|
| + for (auto& it : chunk_processors_) {
|
| + host->Send(new DevToolsAgentMsg_Reattach(
|
| + worker_id_.second, GetId(), it.first, it.second->state_cookie()));
|
| + }
|
| }
|
| OnAttachedStateChanged(true);
|
| } else if (state_ == WORKER_PAUSED_FOR_DEBUG_ON_START) {
|
| @@ -180,8 +178,9 @@ void WorkerDevToolsAgentHost::OnDispatchOnInspectorFrontend(
|
|
|
| void WorkerDevToolsAgentHost::SendChunkedMessage(int session_id,
|
| const std::string& message) {
|
| - if (session() && session()->session_id() == session_id)
|
| - session()->SendMessageToClient(message);
|
| + auto it = sessions().find(session_id);
|
| + if (it != sessions().end())
|
| + it->second->SendMessageToClient(message);
|
| }
|
|
|
| } // namespace content
|
|
|