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

Unified Diff: third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js

Issue 2654253004: DevTools: fix flame chart on profiler pane (Closed)
Patch Set: Created 3 years, 11 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 | « third_party/WebKit/LayoutTests/inspector/components/flame-chart-expected.txt ('k') | 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/perf_ui/FlameChart.js
diff --git a/third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js b/third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js
index b432803c5d3eb5d34126922d1f7b4c3420540a70..29082303f1fbda1300792f27797f428f6c6398f9 100644
--- a/third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js
+++ b/third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js
@@ -1026,7 +1026,7 @@ PerfUI.FlameChart = class extends PerfUI.ChartViewport {
var visible = true;
/** @type !Array<{nestingLevel: number, visible: boolean}> */
var groupStack = [{nestingLevel: -1, visible: true}];
- var lastGroupLevel = Math.max(levelCount, groups.peekLast().startLevel + 1);
+ var lastGroupLevel = Math.max(levelCount, groups.length ? groups.peekLast().startLevel + 1 : 0);
for (var level = 0; level < lastGroupLevel; ++level) {
while (groupIndex < groups.length - 1 && level === groups[groupIndex + 1].startLevel) {
++groupIndex;
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/components/flame-chart-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698