Chromium Code Reviews| 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); |