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

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

Issue 466343002: Filter out workers started by other pages when showing Timeline based on trace events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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/devtools/front_end/timeline/TracingModel.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/timeline/TracingTimelineModel.js
diff --git a/Source/devtools/front_end/timeline/TracingTimelineModel.js b/Source/devtools/front_end/timeline/TracingTimelineModel.js
index dc5c411333ae6b44c981c055bc47641709e5e004..306c4c467434b84fc8ee70c5b4c2a2376413284e 100644
--- a/Source/devtools/front_end/timeline/TracingTimelineModel.js
+++ b/Source/devtools/front_end/timeline/TracingTimelineModel.js
@@ -212,7 +212,8 @@ WebInspector.TracingTimelineModel.prototype = {
_didStopRecordingTraceEvents: function()
{
this._stopCallbackBarrier = null;
- var events = this._tracingModel.devtoolsMetadataEvents();
+ var events = this._tracingModel.devtoolsPageMetadataEvents();
+ var workerMetadataEvents = this._tracingModel.devtoolsWorkerMetadataEvents();
events.sort(WebInspector.TracingModel.Event.compareStartTime);
this._resetProcessingState();
@@ -225,7 +226,13 @@ WebInspector.TracingTimelineModel.prototype = {
if (i + 1 < length)
endTime = events[i + 1].startTime;
- process.sortedThreads().forEach(this._processThreadEvents.bind(this, startTime, endTime, event.thread));
+ var threads = process.sortedThreads();
+ for (var j = 0; j < threads.length; j++) {
+ var thread = threads[j];
+ if (thread.name() === "WebCore: Worker" && !workerMetadataEvents.some(function(e) { return e.thread === thread; }))
+ continue;
+ this._processThreadEvents(startTime, endTime, event.thread, thread);
+ }
}
this._resetProcessingState();
« no previous file with comments | « Source/devtools/front_end/timeline/TracingModel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698