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 bdcaeebbf0b30f836e8a4782cae88799b4e95955..37df519320914f205253b495ba2f202b45478b3c 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 |
| @@ -67,7 +67,7 @@ Components.LineLevelProfile = class { |
| // TODO(alph): use scriptId instead of urls for the target. |
| this._locationPool.disposeAll(); |
| Workspace.workspace.uiSourceCodes().forEach( |
| - uiSourceCode => uiSourceCode.removeAllLineDecorations(Components.LineLevelProfile.LineDecorator.type)); |
| + uiSourceCode => uiSourceCode.removeAllTypeDecorations(Components.LineLevelProfile.LineDecorator.type)); |
| for (var fileInfo of this._files) { |
| var url = /** @type {string} */ (fileInfo[0]); |
| var uiSourceCode = Workspace.workspace.uiSourceCodeForURL(url); |
| @@ -109,10 +109,6 @@ Components.LineLevelProfile.Presentation = class { |
| * @param {!Bindings.LiveLocation} liveLocation |
| */ |
| updateLocation(liveLocation) { |
| - if (this._uiLocation) { |
|
lushnikov
2016/11/16 22:53:54
why this change?
|
| - this._uiLocation.uiSourceCode.removeLineDecoration( |
| - this._uiLocation.lineNumber, Components.LineLevelProfile.LineDecorator.type); |
| - } |
| this._uiLocation = liveLocation.uiLocation(); |
| if (this._uiLocation) { |
| this._uiLocation.uiSourceCode.addLineDecoration( |
| @@ -133,12 +129,12 @@ Components.LineLevelProfile.LineDecorator = class { |
| */ |
| decorate(uiSourceCode, textEditor) { |
| var gutterType = 'CodeMirror-gutter-performance'; |
| - var decorations = uiSourceCode.lineDecorations(Components.LineLevelProfile.LineDecorator.type); |
| + var decorations = uiSourceCode.decorations(Components.LineLevelProfile.LineDecorator.type); |
| textEditor.uninstallGutter(gutterType); |
| if (!decorations) |
| return; |
| textEditor.installGutter(gutterType, false); |
| - for (var decoration of decorations.values()) { |
| + for (var decoration of decorations) { |
| var time = /** @type {number} */ (decoration.data()); |
| var text = Common.UIString('%.1f\xa0ms', time); |
| var intensity = Number.constrain(Math.log10(1 + 2 * time) / 5, 0.02, 1); |