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

Unified Diff: Source/core/workers/WorkerInspectorProxy.cpp

Issue 552323002: DevTools: log worker thread ids on the main thread when Timeline recording is enabled (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 months 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/workers/WorkerInspectorProxy.cpp
diff --git a/Source/core/workers/WorkerInspectorProxy.cpp b/Source/core/workers/WorkerInspectorProxy.cpp
index 589033d0d33b884f4f1ffa30836c5ddbc3afd35b..1e331cd8fc79435b9737169b86124c62f3521e77 100644
--- a/Source/core/workers/WorkerInspectorProxy.cpp
+++ b/Source/core/workers/WorkerInspectorProxy.cpp
@@ -8,6 +8,7 @@
#include "core/dom/CrossThreadTask.h"
#include "core/inspector/InspectorInstrumentation.h"
+#include "core/inspector/InspectorTraceEvents.h"
#include "core/inspector/WorkerInspectorController.h"
#include "core/workers/WorkerThread.h"
#include "platform/TraceEvent.h"
@@ -86,16 +87,11 @@ void WorkerInspectorProxy::sendMessageToInspector(const String& message)
m_workerThread->interruptAndDispatchInspectorCommands();
}
-static void dispatchWriteTimelineStartedEvent(ExecutionContext* context, const String& sessionId)
-{
- TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "TracingStartedInWorker", "sessionId", sessionId.utf8());
-}
-
void WorkerInspectorProxy::writeTimelineStartedEvent(const String& sessionId)
{
if (!m_workerThread)
return;
- m_workerThread->postTask(createCrossThreadTask(dispatchWriteTimelineStartedEvent, String(sessionId)));
+ TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "TracingStartedInWorker", "data", InspectorTracingStartedInWorkerEvent::data(sessionId, m_workerThread));
loislo 2014/09/09 13:59:44 I think with this schema the event should have dif
yurys 2014/09/09 14:46:34 Done. Renamed to TracingSessionIdForWorker
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698