Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js |
| index 0c827449e481f1cf49502fbd4f9c77e79043e360..932e04d37c42f1fd74c95aa0115c5ea514017b5e 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js |
| @@ -185,8 +185,13 @@ Sources.JavaScriptSourceFrame = class extends Sources.UISourceCodeFrame { |
| * @override |
| */ |
| onUISourceCodeContentChanged() { |
| - for (var decoration of this._breakpointDecorations) |
| - decoration.breakpoint.remove(); |
| + var decorations = Array.from(this._breakpointDecorations); |
| + this._textEditor.operation(() => decorations.map(decoration => decoration.hide())); |
|
lushnikov
2016/12/07 05:08:40
Why do we need "hide"? Can't we have just this:
f
kozy
2016/12/07 05:13:15
You're right. breakpoint.remove will synchronously
|
| + for (var decoration of decorations) { |
| + if (decoration.breakpoint) |
| + decoration.breakpoint.remove(); |
| + } |
| + this._breakpointDecorations.clear(); |
| super.onUISourceCodeContentChanged(); |
| } |