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

Unified Diff: Source/core/inspector/InspectorWorkerAgent.cpp

Issue 724013003: DevTools: Connect worker cpu profiles to worker tracing threads. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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: 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

Powered by Google App Engine
This is Rietveld 408576698