| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 if (error) | 262 if (error) |
| 263 console.error('Failed to remove breakpoint: ' + error); | 263 console.error('Failed to remove breakpoint: ' + error); |
| 264 if (callback) | 264 if (callback) |
| 265 callback(); | 265 callback(); |
| 266 } | 266 } |
| 267 } | 267 } |
| 268 | 268 |
| 269 /** | 269 /** |
| 270 * @param {!SDK.DebuggerModel.Location} startLocation | 270 * @param {!SDK.DebuggerModel.Location} startLocation |
| 271 * @param {!SDK.DebuggerModel.Location} endLocation | 271 * @param {!SDK.DebuggerModel.Location} endLocation |
| 272 * @param {boolean} restrictToFunction |
| 272 * @return {!Promise<!Array<!SDK.DebuggerModel.Location>>} | 273 * @return {!Promise<!Array<!SDK.DebuggerModel.Location>>} |
| 273 */ | 274 */ |
| 274 getPossibleBreakpoints(startLocation, endLocation) { | 275 getPossibleBreakpoints(startLocation, endLocation, restrictToFunction) { |
| 275 var fulfill; | 276 var fulfill; |
| 276 var promise = new Promise(resolve => fulfill = resolve); | 277 var promise = new Promise(resolve => fulfill = resolve); |
| 277 this._agent.invoke_getPossibleBreakpoints( | 278 this._agent.invoke_getPossibleBreakpoints( |
| 278 {start: startLocation.payload(), end: endLocation.payload()}, checkError
AndReturn.bind(this)); | 279 {start: startLocation.payload(), end: endLocation.payload(), restrictToF
unction: restrictToFunction}, |
| 280 checkErrorAndReturn.bind(this)); |
| 279 return promise; | 281 return promise; |
| 280 | 282 |
| 281 /** | 283 /** |
| 282 * @this {!SDK.DebuggerModel} | 284 * @this {!SDK.DebuggerModel} |
| 283 * @param {?Protocol.Error} error | 285 * @param {?Protocol.Error} error |
| 284 * @param {?Array<!Protocol.Debugger.Location>} locations | 286 * @param {?Array<!Protocol.Debugger.Location>} locations |
| 285 */ | 287 */ |
| 286 function checkErrorAndReturn(error, locations) { | 288 function checkErrorAndReturn(error, locations) { |
| 287 if (error || !locations) { | 289 if (error || !locations) { |
| 288 fulfill([]); | 290 fulfill([]); |
| (...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1346 stack.callFrames.shift(); | 1348 stack.callFrames.shift(); |
| 1347 if (previous && (!stack.callFrames.length && !stack.promiseCreationFrame)) | 1349 if (previous && (!stack.callFrames.length && !stack.promiseCreationFrame)) |
| 1348 previous.parent = stack.parent; | 1350 previous.parent = stack.parent; |
| 1349 else | 1351 else |
| 1350 previous = stack; | 1352 previous = stack; |
| 1351 stack = stack.parent; | 1353 stack = stack.parent; |
| 1352 } | 1354 } |
| 1353 return asyncStackTrace; | 1355 return asyncStackTrace; |
| 1354 } | 1356 } |
| 1355 }; | 1357 }; |
| OLD | NEW |