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

Unified Diff: third_party/WebKit/Source/devtools/front_end/bindings/BreakpointManager.js

Issue 2886643002: DevTools: do not kill breakpoints in case of persistence and auto-reconnecting target. (Closed)
Patch Set: Created 3 years, 7 months 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/bindings/BreakpointManager.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/BreakpointManager.js b/third_party/WebKit/Source/devtools/front_end/bindings/BreakpointManager.js
index 88df8c07de7cbb1c99df450002bbcead19cc7d72..2883d3756ec26e19acd98f51eef3269f20270114 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/BreakpointManager.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/BreakpointManager.js
@@ -110,6 +110,12 @@ Bindings.BreakpointManager = class extends Common.Object {
var breakpointItems = this._storage.breakpointItems(fromURL);
for (var item of breakpointItems)
this.setBreakpoint(toSourceCode, item.lineNumber, item.columnNumber, item.condition, item.enabled);
+ // Since we can not have two provisional breakpoints which point to the same url, remove one of them.
+ if (fromURL === toSourceCode.url()) {
+ var provisionalBreakpoints = this._provisionalBreakpointsForURL(fromURL);
+ for (var breakpoint of provisionalBreakpoints.values())
+ breakpoint.remove();
+ }
}
removeProvisionalBreakpointsForTest() {
« 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