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

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

Issue 2746333002: DevTools: move recurring flag into AsyncTask, control cancelation from embedder only. (Closed)
Patch Set: Created 3 years, 9 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
Index: third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js
index e85439fe65bfda124757908bc255fff80bf977ed..1fbf4aa7416de577842eca9104cbe823e2a5d71e 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js
@@ -337,7 +337,8 @@ Timeline.TimelineFlameChartDataProvider = class {
var level = this._currentLevel + openEvents.length;
if (flowEventsEnabled)
this._appendFlowEvent(e, level);
- this._appendEvent(e, level);
+ if (e.phase !== SDK.TracingModel.Phase.FlowEnd)
+ this._appendEvent(e, level);
if (!isExtension && TimelineModel.TimelineModel.isMarkerEvent(e))
this._timelineData.entryTotalTimes[this._entryData.length] = undefined;
@@ -744,6 +745,8 @@ Timeline.TimelineFlameChartDataProvider = class {
* @return {number}
*/
function pushStartFlow(event) {
+ if (event.args.name === 'Image')
alph 2017/03/14 00:39:37 What's wrong with Image?
pfeldman 2017/03/14 01:15:10 I'll drop it.
caseq 2017/03/14 01:15:43 This is supposed to work for the generic case of f
+ return -1;
var flowIndex = timelineData.flowStartTimes.length;
timelineData.flowStartTimes.push(event.startTime);
timelineData.flowStartLevels.push(level);
@@ -755,6 +758,8 @@ Timeline.TimelineFlameChartDataProvider = class {
* @param {number} flowIndex
*/
function pushEndFlow(event, flowIndex) {
+ if (flowIndex < 0)
+ return;
timelineData.flowEndTimes[flowIndex] = event.startTime;
timelineData.flowEndLevels[flowIndex] = level;
}

Powered by Google App Engine
This is Rietveld 408576698