Chromium Code Reviews| Index: Source/core/inspector/InspectorWorkerAgent.cpp |
| diff --git a/Source/core/inspector/InspectorWorkerAgent.cpp b/Source/core/inspector/InspectorWorkerAgent.cpp |
| index 85cd12953b225274b9800d803561f09cb70e764b..b2f9209ff1fc4904e15366cc5f75ebd6fb8f699f 100644 |
| --- a/Source/core/inspector/InspectorWorkerAgent.cpp |
| +++ b/Source/core/inspector/InspectorWorkerAgent.cpp |
| @@ -206,8 +206,8 @@ void InspectorWorkerAgent::setTracingSessionId(const String& sessionId) |
| m_tracingSessionId = sessionId; |
| if (sessionId.isEmpty()) |
| return; |
| - for (WorkerIds::iterator it = m_workerIds.begin(); it != m_workerIds.end(); ++it) |
| - it->key->writeTimelineStartedEvent(sessionId); |
| + for (WorkerChannels::iterator it = m_idToChannel.begin(); it != m_idToChannel.end(); ++it) |
| + it->value->proxy()->writeTimelineStartedEvent(it->key, sessionId); |
|
yurys
2014/11/14 13:25:26
This will not write events for workers without con
alph
2014/11/14 15:01:59
Done.
|
| } |
| bool InspectorWorkerAgent::shouldPauseDedicatedWorkerOnStart() |
| @@ -220,8 +220,6 @@ void InspectorWorkerAgent::didStartWorker(WorkerInspectorProxy* workerInspectorP |
| m_workerIds.set(workerInspectorProxy, url.string()); |
| if (m_frontend && m_state->getBoolean(WorkerAgentState::workerInspectionEnabled)) |
| createWorkerFrontendChannel(workerInspectorProxy, url.string()); |
| - if (!m_tracingSessionId.isEmpty()) |
| - workerInspectorProxy->writeTimelineStartedEvent(m_tracingSessionId); |
| } |
| void InspectorWorkerAgent::workerTerminated(WorkerInspectorProxy* proxy) |
| @@ -262,6 +260,8 @@ void InspectorWorkerAgent::createWorkerFrontendChannel(WorkerInspectorProxy* wor |
| if (autoconnectToWorkers) |
| channel->connectToWorker(); |
| m_frontend->workerCreated(channel->id(), url, autoconnectToWorkers); |
| + if (!m_tracingSessionId.isEmpty()) |
| + workerInspectorProxy->writeTimelineStartedEvent(channel->id(), m_tracingSessionId); |
| } |
| } // namespace blink |