| 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 /** | 339 /** |
| 340 * @return {!Array.<!SDK.Script>} | 340 * @return {!Array.<!SDK.Script>} |
| 341 */ | 341 */ |
| 342 scriptsForSourceURL(sourceURL) { | 342 scriptsForSourceURL(sourceURL) { |
| 343 if (!sourceURL) | 343 if (!sourceURL) |
| 344 return []; | 344 return []; |
| 345 return this._scriptsBySourceURL.get(sourceURL) || []; | 345 return this._scriptsBySourceURL.get(sourceURL) || []; |
| 346 } | 346 } |
| 347 | 347 |
| 348 /** | 348 /** |
| 349 * @param {!SDK.ExecutionContext} executionContext |
| 350 * @return {!Array<!SDK.Script>} |
| 351 */ |
| 352 scriptsForExecutionContext(executionContext) { |
| 353 return Object.values(this._scripts).filter(script => script.executionContext
Id === executionContext.id); |
| 354 } |
| 355 |
| 356 /** |
| 349 * @param {!Protocol.Runtime.ScriptId} scriptId | 357 * @param {!Protocol.Runtime.ScriptId} scriptId |
| 350 * @param {string} newSource | 358 * @param {string} newSource |
| 351 * @param {function(?Protocol.Error, !Protocol.Runtime.ExceptionDetails=)} cal
lback | 359 * @param {function(?Protocol.Error, !Protocol.Runtime.ExceptionDetails=)} cal
lback |
| 352 */ | 360 */ |
| 353 setScriptSource(scriptId, newSource, callback) { | 361 setScriptSource(scriptId, newSource, callback) { |
| 354 this._scripts[scriptId].editSource(newSource, this._didEditScriptSource.bind
(this, scriptId, newSource, callback)); | 362 this._scripts[scriptId].editSource(newSource, this._didEditScriptSource.bind
(this, scriptId, newSource, callback)); |
| 355 } | 363 } |
| 356 | 364 |
| 357 /** | 365 /** |
| 358 * @param {!Protocol.Runtime.ScriptId} scriptId | 366 * @param {!Protocol.Runtime.ScriptId} scriptId |
| (...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1387 stack.callFrames.shift(); | 1395 stack.callFrames.shift(); |
| 1388 if (previous && (!stack.callFrames.length && !stack.promiseCreationFrame)) | 1396 if (previous && (!stack.callFrames.length && !stack.promiseCreationFrame)) |
| 1389 previous.parent = stack.parent; | 1397 previous.parent = stack.parent; |
| 1390 else | 1398 else |
| 1391 previous = stack; | 1399 previous = stack; |
| 1392 stack = stack.parent; | 1400 stack = stack.parent; |
| 1393 } | 1401 } |
| 1394 return asyncStackTrace; | 1402 return asyncStackTrace; |
| 1395 } | 1403 } |
| 1396 }; | 1404 }; |
| OLD | NEW |