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

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

Issue 323873002: Timeline: do not remove trace object snapshots from event list of their threads (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments addressed Created 6 years, 6 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 | « no previous file | Source/devtools/front_end/timeline/TracingModel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/timeline/TimelineTracingView.js
diff --git a/Source/devtools/front_end/timeline/TimelineTracingView.js b/Source/devtools/front_end/timeline/TimelineTracingView.js
index 681ef95e0517e66de8413b5006561501d4a91bff..5a79faf4033fdde6728038f37e1d2138d5389c7c 100644
--- a/Source/devtools/front_end/timeline/TimelineTracingView.js
+++ b/Source/devtools/front_end/timeline/TimelineTracingView.js
@@ -326,7 +326,7 @@ WebInspector.TraceViewFlameChartDataProvider.prototype = {
this._appendHeaderRecord(WebInspector.UIString("Object %s", objectNames[objectNameIndex]), this._threadHeaderRecord);
var objects = process.objectsByName(objectNames[objectNameIndex]);
for (var objectIndex = 0; objectIndex < objects.length; ++objectIndex)
- this._appendRecord(objects[objectIndex]);
+ this._appendRecord(objects[objectIndex], 0);
++this._currentLevel;
}
var threads = process.sortedThreads();
@@ -336,7 +336,7 @@ WebInspector.TraceViewFlameChartDataProvider.prototype = {
for (var eventIndex = 0; eventIndex < events.length; ++eventIndex) {
var event = events[eventIndex];
if (event.duration)
- this._appendRecord(event);
+ this._appendRecord(event, event.level);
}
this._currentLevel += threads[threadIndex].maxStackDepth();
}
@@ -477,12 +477,13 @@ WebInspector.TraceViewFlameChartDataProvider.prototype = {
/**
* @param {!WebInspector.TracingModel.Event} record
+ * @param {number} level
*/
- _appendRecord: function(record)
+ _appendRecord: function(record, level)
{
var index = this._records.length;
this._records.push(record);
- this._timelineData.entryLevels[index] = this._currentLevel + record.level;
+ this._timelineData.entryLevels[index] = this._currentLevel + level;
this._timelineData.entryTotalTimes[index] = record.phase === WebInspector.TracingModel.Phase.SnapshotObject ? NaN : record.duration || 0;
this._timelineData.entryStartTimes[index] = record.startTime;
},
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TracingModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698