| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 debuggerModel, uiSourceCode, textRange.endLine, textRange.endColumn); | 278 debuggerModel, uiSourceCode, textRange.endLine, textRange.endColumn); |
| 279 if (!endLocation) | 279 if (!endLocation) |
| 280 continue; | 280 continue; |
| 281 return debuggerModel.getPossibleBreakpoints(startLocation, endLocation, /*
restrictToFunction */ false) | 281 return debuggerModel.getPossibleBreakpoints(startLocation, endLocation, /*
restrictToFunction */ false) |
| 282 .then(toUILocations.bind(this)); | 282 .then(toUILocations.bind(this)); |
| 283 } | 283 } |
| 284 return Promise.resolve([]); | 284 return Promise.resolve([]); |
| 285 | 285 |
| 286 /** | 286 /** |
| 287 * @this {!Bindings.BreakpointManager} | 287 * @this {!Bindings.BreakpointManager} |
| 288 * @param {!Array<!SDK.DebuggerModel.Location>} locations | 288 * @param {!Array<!SDK.DebuggerModel.BreakLocation>} locations |
| 289 * @return {!Array<!Workspace.UILocation>} | 289 * @return {!Array<!Workspace.UILocation>} |
| 290 */ | 290 */ |
| 291 function toUILocations(locations) { | 291 function toUILocations(locations) { |
| 292 var sortedLocations = locations.map(location => this._debuggerWorkspaceBin
ding.rawLocationToUILocation(location)); | 292 var sortedLocations = locations.map(location => this._debuggerWorkspaceBin
ding.rawLocationToUILocation(location)); |
| 293 sortedLocations = sortedLocations.filter(location => location && location.
uiSourceCode === uiSourceCode); | 293 sortedLocations = sortedLocations.filter(location => location && location.
uiSourceCode === uiSourceCode); |
| 294 sortedLocations.sort(Workspace.UILocation.comparator); | 294 sortedLocations.sort(Workspace.UILocation.comparator); |
| 295 if (!sortedLocations.length) | 295 if (!sortedLocations.length) |
| 296 return []; | 296 return []; |
| 297 var result = [sortedLocations[0]]; | 297 var result = [sortedLocations[0]]; |
| 298 var lastLocation = sortedLocations[0]; | 298 var lastLocation = sortedLocations[0]; |
| (...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1088 this.url = breakpoint._url; | 1088 this.url = breakpoint._url; |
| 1089 this.lineNumber = breakpoint.lineNumber(); | 1089 this.lineNumber = breakpoint.lineNumber(); |
| 1090 this.columnNumber = breakpoint.columnNumber(); | 1090 this.columnNumber = breakpoint.columnNumber(); |
| 1091 this.condition = breakpoint.condition(); | 1091 this.condition = breakpoint.condition(); |
| 1092 this.enabled = breakpoint.enabled(); | 1092 this.enabled = breakpoint.enabled(); |
| 1093 } | 1093 } |
| 1094 }; | 1094 }; |
| 1095 | 1095 |
| 1096 /** @type {!Bindings.BreakpointManager} */ | 1096 /** @type {!Bindings.BreakpointManager} */ |
| 1097 Bindings.breakpointManager; | 1097 Bindings.breakpointManager; |
| OLD | NEW |