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 5ab6e7770ff63d94bd37d6390d556da320e9e163..88df8c07de7cbb1c99df450002bbcead19cc7d72 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/bindings/BreakpointManager.js |
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/BreakpointManager.js |
@@ -266,15 +266,13 @@ |
* @return {!Promise<!Array<!Workspace.UILocation>>} |
*/ |
possibleBreakpoints(uiSourceCode, textRange) { |
- var startLocations = Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations( |
+ var startLocation = Bindings.debuggerWorkspaceBinding.uiLocationToRawLocation( |
uiSourceCode, textRange.startLine, textRange.startColumn); |
- var endLocations = Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations( |
- uiSourceCode, textRange.endLine, textRange.endColumn); |
- var startLocationsByScript = new Map(startLocations.map(location => [location.script(), location])); |
- var endLocation = endLocations.find(location => location.script() && startLocationsByScript.get(location.script())); |
- if (!endLocation) |
+ var endLocation = |
+ Bindings.debuggerWorkspaceBinding.uiLocationToRawLocation(uiSourceCode, textRange.endLine, textRange.endColumn); |
+ if (!startLocation || !endLocation || startLocation.debuggerModel !== endLocation.debuggerModel) |
return Promise.resolve([]); |
- var startLocation = startLocationsByScript.get(endLocation.script()); |
+ |
return startLocation.debuggerModel |
.getPossibleBreakpoints(startLocation, endLocation, /* restrictToFunction */ false) |
.then(toUILocations.bind(this)); |
@@ -811,7 +809,7 @@ |
var condition = this._breakpoint.condition(); |
var debuggerLocation = uiSourceCode && |
- Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber)[0]; |
+ Bindings.debuggerWorkspaceBinding.uiLocationToRawLocation(uiSourceCode, lineNumber, columnNumber); |
var newState; |
if (this._breakpoint._isRemoved || !this._breakpoint.enabled() || this._scriptDiverged()) { |
newState = null; |