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

Unified Diff: Source/devtools/front_end/timeline/TimelinePaintProfilerView.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/TimelinePaintProfilerView.js
diff --git a/Source/devtools/front_end/timeline/TimelinePaintProfilerView.js b/Source/devtools/front_end/timeline/TimelinePaintProfilerView.js
index d206a89cdcb8e4c93e40f82f90a6c803c23113e8..a1a478c50fa92d709b2344583633bc038f2794ff 100644
--- a/Source/devtools/front_end/timeline/TimelinePaintProfilerView.js
+++ b/Source/devtools/front_end/timeline/TimelinePaintProfilerView.js
@@ -92,8 +92,10 @@ WebInspector.TimelinePaintProfilerView.prototype = {
this._disposeSnapshot();
this._lastLoadedSnapshot = snapshot;
this._imageView.setMask(tileRect);
- if (!snapshot)
+ if (!snapshot) {
+ this._imageView.showImage();
return;
+ }
snapshot.commandLog(onCommandLogDone.bind(this, snapshot, tileRect));
}
@@ -105,7 +107,7 @@ WebInspector.TimelinePaintProfilerView.prototype = {
*/
function onCommandLogDone(snapshot, clipRect, log)
{
- this._logTreeView.setCommandLog(snapshot.target(), log);
+ this._logTreeView.setCommandLog(snapshot.target(), log || []);
this._paintProfilerView.setSnapshotAndLog(snapshot, log || [], clipRect);
}
},
@@ -193,7 +195,8 @@ WebInspector.TimelinePaintImageView.prototype = {
showImage: function(imageURL)
{
this._imageContainer.classList.toggle("hidden", !imageURL);
- this._imageElement.src = imageURL;
+ if (imageURL)
+ this._imageElement.src = imageURL;
},
/**
« no previous file with comments | « Source/devtools/front_end/timeline/PaintProfilerView.js ('k') | Source/devtools/front_end/ui_lazy/OverviewGrid.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698