Skip to content

Commit

Permalink
Revert of DevTools: fix aggregated donut chart cache population (patc…
Browse files Browse the repository at this point in the history
…hset #1 id:1 of https://codereview.chromium.org/2840463003/ )

Reason for revert:
Suspected cause of failure of virtual/threaded/inspector/tracing/timeline-js/timeline-runtime-stats.html in https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Win7%20(dbg)/builds/9644

Original issue's description:
> DevTools: fix aggregated donut chart cache population
>
> The check for stats cache availablity was made on the first task in the main thread
> tasks list. If the first task happens to be filtered out, it never gets cache built for
> it. Later the cache presence check would look for a cache on the first task, never find
> it and forces recaching.
>
> BUG=714934
>
> Review-Url: https://codereview.chromium.org/2840463003
> Cr-Commit-Position: refs/heads/master@{#467114}
> Committed: https://chromium.googlesource.com/chromium/src/+/755b1656f38d135013f24ddd8b6ec046874beed2

[email protected],[email protected]
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=714934

Review-Url: https://codereview.chromium.org/2839083002
Cr-Commit-Position: refs/heads/master@{#467223}
  • Loading branch information
sashab authored and Commit bot committed Apr 26, 2017
1 parent b234267 commit 578fd5a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions front_end/timeline/TimelineUIUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1046,14 +1046,13 @@ Timeline.TimelineUIUtils = class {
*/
static _buildRangeStatsCacheIfNeeded(model) {
var tasks = model.mainThreadTasks();
var filter = Timeline.TimelineUIUtils._filterForStats();
var firstTask = tasks.find(filter);
if (!firstTask || firstTask[Timeline.TimelineUIUtils._categoryBreakdownCacheSymbol])
if (tasks.length && tasks[0][Timeline.TimelineUIUtils._categoryBreakdownCacheSymbol])
return;
var aggregatedStats = {};
var ownTimes = [];
TimelineModel.TimelineModel.forEachEvent(
model.mainThreadEvents(), onStartEvent, onEndEvent, undefined, undefined, undefined, filter);
model.mainThreadEvents(), onStartEvent, onEndEvent, undefined, undefined, undefined,
Timeline.TimelineUIUtils._filterForStats());

/**
* @param {!SDK.TracingModel.Event} e
Expand Down

0 comments on commit 578fd5a

Please sign in to comment.