| 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 * @return {!Promise<!Array<!SDK.DebuggerModel.Location>>} | 272 * @return {!Promise<!Array<!SDK.DebuggerModel.Location>>} |
| 273 */ | 273 */ |
| 274 getPossibleBreakpoints(startLocation, endLocation) { | 274 getPossibleBreakpoints(startLocation, endLocation) { |
| 275 var fulfill; | 275 var fulfill; |
| 276 var promise = new Promise(resolve => fulfill = resolve); | 276 var promise = new Promise(resolve => fulfill = resolve); |
| 277 this._agent.getPossibleBreakpoints(startLocation.payload(), endLocation.payl
oad(), checkErrorAndReturn.bind(this)); | 277 this._agent.invoke_getPossibleBreakpoints( |
| 278 {start: startLocation.payload(), end: endLocation.payload()}, checkError
AndReturn.bind(this)); |
| 278 return promise; | 279 return promise; |
| 279 | 280 |
| 280 /** | 281 /** |
| 281 * @this {!SDK.DebuggerModel} | 282 * @this {!SDK.DebuggerModel} |
| 282 * @param {?Protocol.Error} error | 283 * @param {?Protocol.Error} error |
| 283 * @param {?Array<!Protocol.Debugger.Location>} locations | 284 * @param {?Array<!Protocol.Debugger.Location>} locations |
| 284 */ | 285 */ |
| 285 function checkErrorAndReturn(error, locations) { | 286 function checkErrorAndReturn(error, locations) { |
| 286 if (error || !locations) { | 287 if (error || !locations) { |
| 287 fulfill([]); | 288 fulfill([]); |
| (...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1345 stack.callFrames.shift(); | 1346 stack.callFrames.shift(); |
| 1346 if (previous && (!stack.callFrames.length && !stack.promiseCreationFrame)) | 1347 if (previous && (!stack.callFrames.length && !stack.promiseCreationFrame)) |
| 1347 previous.parent = stack.parent; | 1348 previous.parent = stack.parent; |
| 1348 else | 1349 else |
| 1349 previous = stack; | 1350 previous = stack; |
| 1350 stack = stack.parent; | 1351 stack = stack.parent; |
| 1351 } | 1352 } |
| 1352 return asyncStackTrace; | 1353 return asyncStackTrace; |
| 1353 } | 1354 } |
| 1354 }; | 1355 }; |
| OLD | NEW |