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

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

Issue 322783002: Initialize min/max record time to 0 instead of -1 or null (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase 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/TimelineModel.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 73b84602a482e5b487067af15cebc620f71064b4..2e0b4b1db59ae48ec0405688c4095f7e5294809f 100644
--- a/Source/devtools/front_end/timeline/TimelineFlameChart.js
+++ b/Source/devtools/front_end/timeline/TimelineFlameChart.js
@@ -131,7 +131,7 @@ WebInspector.TimelineFlameChartDataProvider.prototype = {
this._records = [];
this._entryThreadDepths = {};
- this._minimumBoundary = Math.max(0, this._model.minimumRecordTime());
+ this._minimumBoundary = this._model.minimumRecordTime();
var cpuThreadRecordPayload = { type: WebInspector.TimelineModel.RecordType.Program };
this._cpuThreadRecord = new WebInspector.TimelineModel.RecordImpl(this._model, /** @type {!TimelineAgent.TimelineEvent} */ (cpuThreadRecordPayload), null);
@@ -549,8 +549,8 @@ WebInspector.TracingBasedTimelineFlameChartDataProvider.prototype = {
};
this._currentLevel = 0;
- this._minimumBoundary = this._model.minimumRecordTime() || 0;
- this._timeSpan = Math.max((this._model.maximumRecordTime() || 0) - this._minimumBoundary, 1000000);
+ this._minimumBoundary = this._model.minimumRecordTime();
+ this._timeSpan = Math.max(this._model.maximumRecordTime() - this._minimumBoundary, 1000);
this._appendHeaderRecord("CPU");
var events = this._model.mainThreadEvents();
var maxStackDepth = 0;
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TimelineModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698