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

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js

Issue 2840463003: DevTools: fix aggregated donut chart cache population (Closed)
Patch Set: Created 3 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
index 3a8ec1a4f2c8cf94eeb89dc612a7b1c78dcfe773..1567c91bce59ad51aedef49893d184e50980c924 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
@@ -1046,13 +1046,14 @@ Timeline.TimelineUIUtils = class {
*/
static _buildRangeStatsCacheIfNeeded(model) {
var tasks = model.mainThreadTasks();
- if (tasks.length && tasks[0][Timeline.TimelineUIUtils._categoryBreakdownCacheSymbol])
+ var filter = Timeline.TimelineUIUtils._filterForStats();
+ var firstTask = tasks.find(filter);
+ if (!firstTask || firstTask[Timeline.TimelineUIUtils._categoryBreakdownCacheSymbol])
return;
var aggregatedStats = {};
var ownTimes = [];
TimelineModel.TimelineModel.forEachEvent(
- model.mainThreadEvents(), onStartEvent, onEndEvent, undefined, undefined, undefined,
- Timeline.TimelineUIUtils._filterForStats());
+ model.mainThreadEvents(), onStartEvent, onEndEvent, undefined, undefined, undefined, filter);
/**
* @param {!SDK.TracingModel.Event} e
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698