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

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

Issue 1163223003: DevTools: better error handling in paint profiler UI (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
Index: Source/devtools/front_end/timeline/PaintProfilerView.js
diff --git a/Source/devtools/front_end/timeline/PaintProfilerView.js b/Source/devtools/front_end/timeline/PaintProfilerView.js
index c3b61b905dab2350491b78698bb14ba33e891588..fd7a0933f210327e803aa33c8d2d707c1e951a29 100644
--- a/Source/devtools/front_end/timeline/PaintProfilerView.js
+++ b/Source/devtools/front_end/timeline/PaintProfilerView.js
@@ -84,8 +84,10 @@ WebInspector.PaintProfilerView.prototype = {
if (!this._snapshot) {
this._update();
this._pieChart.setTotal(0);
+ this._selectionWindow.setEnabled(false);
return;
}
+ this._selectionWindow.setEnabled(true);
this._progressBanner.classList.remove("hidden");
snapshot.requestImage(null, null, 1, this._showImageCallback);
snapshot.profile(clipRect, onProfileDone.bind(this));
@@ -271,7 +273,7 @@ WebInspector.PaintProfilerCommandLogView = function()
WebInspector.PaintProfilerCommandLogView.prototype = {
/**
* @param {?WebInspector.Target} target
- * @param {!Array.<!WebInspector.PaintProfilerLogItem>=} log
+ * @param {!Array.<!WebInspector.PaintProfilerLogItem>} log
*/
setCommandLog: function(target, log)
{
@@ -297,7 +299,7 @@ WebInspector.PaintProfilerCommandLogView.prototype = {
updateWindow: function(stepLeft, stepRight)
{
this._treeOutline.removeChildren();
- if (!this._log)
+ if (!this._log.length)
return;
stepLeft = stepLeft || 0;
stepRight = stepRight || this._log.length;

Powered by Google App Engine
This is Rietveld 408576698