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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js

Issue 2552323003: [DevTools] clean breakpoints and decorations onUISourceCodeContentChanged (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698