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

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

Issue 363343004: DevTools: Unify main thread name across vanilla and tracing timeline modes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/TimelineFrameModel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/timeline/TimelineFlameChart.js
diff --git a/Source/devtools/front_end/timeline/TimelineFlameChart.js b/Source/devtools/front_end/timeline/TimelineFlameChart.js
index a51c55e4b1d8c698d4b2a64ece4b1c89e7359862..3105d24e0a8f109980d4e557fd5fe462ac2350da 100644
--- a/Source/devtools/front_end/timeline/TimelineFlameChart.js
+++ b/Source/devtools/front_end/timeline/TimelineFlameChart.js
@@ -146,7 +146,7 @@ WebInspector.TimelineFlameChartDataProvider.prototype = {
var thread = record.thread();
if (thread === "gpu")
continue;
- if (!thread) {
+ if (thread === WebInspector.TimelineModel.MainThreadName) {
for (var j = 0; j < record.children().length; ++j)
this._appendRecord(record.children()[j], 1);
} else {
@@ -159,8 +159,8 @@ WebInspector.TimelineFlameChartDataProvider.prototype = {
}
}
- var cpuStackDepth = Math.max(4, this._entryThreadDepths[undefined]);
- delete this._entryThreadDepths[undefined];
+ var cpuStackDepth = Math.max(4, this._entryThreadDepths[WebInspector.TimelineModel.MainThreadName]);
+ delete this._entryThreadDepths[WebInspector.TimelineModel.MainThreadName];
this._maxStackDepth = cpuStackDepth;
if (this._gpuThreadRecord) {
@@ -181,7 +181,7 @@ WebInspector.TimelineFlameChartDataProvider.prototype = {
level = 0;
else if (record === this._gpuThreadRecord)
level = cpuStackDepth + 2;
- else if (record.thread())
+ else if (record.thread() !== WebInspector.TimelineModel.MainThreadName)
level += threadBaselines[record.thread()];
this._timelineData.entryLevels[i] = level;
}
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TimelineFrameModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698