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

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

Issue 710113002: DevTools: remove TimelineModel.Events.RecordAdded event (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed comment 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
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineView.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 ebeca915844946c37e5a38f79e40956ca2ba77e6..fe71ca73fbc90bcf552a65b88a7a0e98b77f5246 100644
--- a/Source/devtools/front_end/timeline/TracingTimelineModel.js
+++ b/Source/devtools/front_end/timeline/TracingTimelineModel.js
@@ -439,8 +439,15 @@ WebInspector.TracingTimelineModel.prototype = {
}
this.virtualThreads().forEach(processVirtualThreadEvents.bind(this));
- for (var i = 0; i < topLevelRecords.length; i++)
- this._addTopLevelRecord(topLevelRecords[i]);
+
+ for (var i = 0; i < topLevelRecords.length; i++) {
+ var record = topLevelRecords[i];
+ if (record.type() === WebInspector.TracingTimelineModel.RecordType.Program)
+ this._mainThreadTasks.push(record);
+ if (record.type() === WebInspector.TracingTimelineModel.RecordType.GPUTask)
+ this._gpuThreadTasks.push(record);
+ }
+ this._records = topLevelRecords;
},
/**
@@ -482,19 +489,6 @@ WebInspector.TracingTimelineModel.prototype = {
return topLevelRecords;
},
- /**
- * @param {!WebInspector.TracingTimelineModel.TraceEventRecord} record
- */
- _addTopLevelRecord: function(record)
- {
- this._records.push(record);
- if (record.type() === WebInspector.TracingTimelineModel.RecordType.Program)
- this._mainThreadTasks.push(record);
- if (record.type() === WebInspector.TracingTimelineModel.RecordType.GPUTask)
- this._gpuThreadTasks.push(record);
- this.dispatchEventToListeners(WebInspector.TimelineModel.Events.RecordAdded, record);
- },
-
_resetProcessingState: function()
{
this._sendRequestEvents = {};
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698