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

Unified Diff: third_party/WebKit/Source/devtools/front_end/components_lazy/LineLevelProfile.js

Issue 2492343002: Devtools: Pretty print fix for CSS coverage decorations. (Closed)
Patch Set: Pretty print fix for CSS coverage decorations. Created 4 years, 1 month 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: third_party/WebKit/Source/devtools/front_end/components_lazy/LineLevelProfile.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components_lazy/LineLevelProfile.js b/third_party/WebKit/Source/devtools/front_end/components_lazy/LineLevelProfile.js
index 971bedbfb661420417d0cb3699f4d59062cc3cc8..e0789a67f5383eb19284157df420662a6c32fbb0 100644
--- a/third_party/WebKit/Source/devtools/front_end/components_lazy/LineLevelProfile.js
+++ b/third_party/WebKit/Source/devtools/front_end/components_lazy/LineLevelProfile.js
@@ -134,10 +134,10 @@ WebInspector.LineLevelProfile.LineDecorator = class {
var gutterType = 'CodeMirror-gutter-performance';
var decorations = uiSourceCode.lineDecorations(WebInspector.LineLevelProfile.LineDecorator.type);
lushnikov 2016/11/11 23:28:01 let's make .lineDecorations() non-nullable
textEditor.uninstallGutter(gutterType);
- if (!decorations)
+ if (!decorations || !decorations.size)
return;
textEditor.installGutter(gutterType, false);
- for (var decoration of decorations.values()) {
+ for (var decoration of decorations) {
var time = /** @type {number} */ (decoration.data());
var text = WebInspector.UIString('%.1f\xa0ms', time);
var intensity = Number.constrain(Math.log10(1 + 2 * time) / 5, 0.02, 1);

Powered by Google App Engine
This is Rietveld 408576698