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

Unified Diff: Source/devtools/front_end/timeline/TracingModel.js

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: Rebase 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
« no previous file with comments | « Source/core/workers/WorkerThread.cpp ('k') | Source/devtools/front_end/timeline/TracingTimelineModel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/timeline/TracingModel.js
diff --git a/Source/devtools/front_end/timeline/TracingModel.js b/Source/devtools/front_end/timeline/TracingModel.js
index 693e631fd91333ecfcd7a3231448b76f212760cc..9701bdb7cd80d08f23cc5351978603d2430208e7 100644
--- a/Source/devtools/front_end/timeline/TracingModel.js
+++ b/Source/devtools/front_end/timeline/TracingModel.js
@@ -50,7 +50,7 @@ WebInspector.TracingModel.FrameLifecycleEventCategory = "cc,devtools";
WebInspector.TracingModel.DevToolsMetadataEvent = {
TracingStartedInPage: "TracingStartedInPage",
- TracingStartedInWorker: "TracingStartedInWorker",
+ TracingSessionIdForWorker: "TracingSessionIdForWorker",
};
/**
@@ -158,7 +158,7 @@ WebInspector.TracingModel.prototype = {
event.category === WebInspector.TracingModel.DevToolsMetadataEventCategory) {
this._devtoolsPageMetadataEvents.push(event);
}
- if (event && event.name === WebInspector.TracingModel.DevToolsMetadataEvent.TracingStartedInWorker &&
+ if (event && event.name === WebInspector.TracingModel.DevToolsMetadataEvent.TracingSessionIdForWorker &&
event.category === WebInspector.TracingModel.DevToolsMetadataEventCategory) {
this._devtoolsWorkerMetadataEvents.push(event);
}
@@ -193,7 +193,11 @@ WebInspector.TracingModel.prototype = {
var mismatchingIds = {};
function checkSessionId(event)
{
- var id = event.args["sessionId"];
+ var args = event.args;
+ // FIXME: put sessionId into args["data"] for TracingStartedInPage event.
+ if (args["data"])
+ args = args["data"];
+ var id = args["sessionId"];
if (id === sessionId)
return true;
mismatchingIds[id] = true;
@@ -593,6 +597,7 @@ WebInspector.TracingModel.Thread = function(process, id)
this._setName("Thread " + id);
this._events = [];
this._asyncEvents = [];
+ this._id = id;
this._stack = [];
}
@@ -644,6 +649,14 @@ WebInspector.TracingModel.Thread.prototype = {
},
/**
+ * @return {number}
+ */
+ id: function()
+ {
+ return this._id;
+ },
+
+ /**
* @return {!WebInspector.TracingModel.Process}
*/
process: function()
« no previous file with comments | « Source/core/workers/WorkerThread.cpp ('k') | Source/devtools/front_end/timeline/TracingTimelineModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698