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 16 matching lines...) Expand all Loading... |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 "use strict"; | 30 "use strict"; |
31 | 31 |
32 (function () { | 32 (function () { |
33 | 33 |
34 var DebuggerScript = {}; | 34 var DebuggerScript = {}; |
35 | 35 |
36 /** @enum */ | 36 /** @enum */ |
37 DebuggerScript.PauseOnExceptionsState = { | 37 const PauseOnExceptionsState = { |
38 DontPauseOnExceptions: 0, | 38 DontPauseOnExceptions: 0, |
39 PauseOnAllExceptions: 1, | 39 PauseOnAllExceptions: 1, |
40 PauseOnUncaughtExceptions: 2 | 40 PauseOnUncaughtExceptions: 2 |
41 }; | 41 }; |
| 42 DebuggerScript.PauseOnExceptionsState = PauseOnExceptionsState; |
42 | 43 |
43 DebuggerScript._pauseOnExceptionsState = DebuggerScript.PauseOnExceptionsState.D
ontPauseOnExceptions; | 44 DebuggerScript._pauseOnExceptionsState = DebuggerScript.PauseOnExceptionsState.D
ontPauseOnExceptions; |
44 Debug.clearBreakOnException(); | 45 Debug.clearBreakOnException(); |
45 Debug.clearBreakOnUncaughtException(); | 46 Debug.clearBreakOnUncaughtException(); |
46 | 47 |
47 /** | 48 /** |
48 * @param {?CompileEvent} eventData | 49 * @param {?CompileEvent} eventData |
49 */ | 50 */ |
50 DebuggerScript.getAfterCompileScript = function(eventData) | 51 DebuggerScript.getAfterCompileScript = function(eventData) |
51 { | 52 { |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 var frameDetails = frameMirror.details(); | 416 var frameDetails = frameMirror.details(); |
416 | 417 |
417 var funcObject = frameDetails.func(); | 418 var funcObject = frameDetails.func(); |
418 var sourcePosition = frameDetails.sourcePosition(); | 419 var sourcePosition = frameDetails.sourcePosition(); |
419 var thisObject = frameDetails.receiver(); | 420 var thisObject = frameDetails.receiver(); |
420 | 421 |
421 var isAtReturn = !!frameDetails.isAtReturn(); | 422 var isAtReturn = !!frameDetails.isAtReturn(); |
422 var returnValue = isAtReturn ? frameDetails.returnValue() : undefined; | 423 var returnValue = isAtReturn ? frameDetails.returnValue() : undefined; |
423 | 424 |
424 var scopeMirrors = frameMirror.allScopes(false); | 425 var scopeMirrors = frameMirror.allScopes(false); |
425 /** @type {!Array<ScopeType>} */ | 426 /** @type {!Array<number>} */ |
426 var scopeTypes = new Array(scopeMirrors.length); | 427 var scopeTypes = new Array(scopeMirrors.length); |
427 /** @type {?Array<!Object>} */ | 428 /** @type {?Array<!Object>} */ |
428 var scopeObjects = new Array(scopeMirrors.length); | 429 var scopeObjects = new Array(scopeMirrors.length); |
429 /** @type {!Array<string|undefined>} */ | 430 /** @type {!Array<string|undefined>} */ |
430 var scopeNames = new Array(scopeMirrors.length); | 431 var scopeNames = new Array(scopeMirrors.length); |
431 /** @type {?Array<number>} */ | 432 /** @type {?Array<number>} */ |
432 var scopeStartPositions = new Array(scopeMirrors.length); | 433 var scopeStartPositions = new Array(scopeMirrors.length); |
433 /** @type {?Array<number>} */ | 434 /** @type {?Array<number>} */ |
434 var scopeEndPositions = new Array(scopeMirrors.length); | 435 var scopeEndPositions = new Array(scopeMirrors.length); |
435 /** @type {?Array<function()|null>} */ | 436 /** @type {?Array<function()|null>} */ |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 break; | 703 break; |
703 } | 704 } |
704 return result; | 705 return result; |
705 } | 706 } |
706 | 707 |
707 // We never resolve Mirror by its handle so to avoid memory leaks caused by Mirr
ors in the cache we disable it. | 708 // We never resolve Mirror by its handle so to avoid memory leaks caused by Mirr
ors in the cache we disable it. |
708 ToggleMirrorCache(false); | 709 ToggleMirrorCache(false); |
709 | 710 |
710 return DebuggerScript; | 711 return DebuggerScript; |
711 })(); | 712 })(); |
OLD | NEW |