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 15 matching lines...) Expand all Loading... |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
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 /** | |
37 * @param {?CompileEvent} eventData | |
38 */ | |
39 DebuggerScript.getAfterCompileScript = function(eventData) | |
40 { | |
41 var script = eventData.script().value(); | |
42 if (!script.is_debugger_script) | |
43 return script; | |
44 return null; | |
45 } | |
46 | |
47 /** @type {!Map<!ScopeType, string>} */ | 36 /** @type {!Map<!ScopeType, string>} */ |
48 DebuggerScript._scopeTypeNames = new Map(); | 37 DebuggerScript._scopeTypeNames = new Map(); |
49 DebuggerScript._scopeTypeNames.set(ScopeType.Global, "global"); | 38 DebuggerScript._scopeTypeNames.set(ScopeType.Global, "global"); |
50 DebuggerScript._scopeTypeNames.set(ScopeType.Local, "local"); | 39 DebuggerScript._scopeTypeNames.set(ScopeType.Local, "local"); |
51 DebuggerScript._scopeTypeNames.set(ScopeType.With, "with"); | 40 DebuggerScript._scopeTypeNames.set(ScopeType.With, "with"); |
52 DebuggerScript._scopeTypeNames.set(ScopeType.Closure, "closure"); | 41 DebuggerScript._scopeTypeNames.set(ScopeType.Closure, "closure"); |
53 DebuggerScript._scopeTypeNames.set(ScopeType.Catch, "catch"); | 42 DebuggerScript._scopeTypeNames.set(ScopeType.Catch, "catch"); |
54 DebuggerScript._scopeTypeNames.set(ScopeType.Block, "block"); | 43 DebuggerScript._scopeTypeNames.set(ScopeType.Block, "block"); |
55 DebuggerScript._scopeTypeNames.set(ScopeType.Script, "script"); | 44 DebuggerScript._scopeTypeNames.set(ScopeType.Script, "script"); |
56 | 45 |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 break; | 553 break; |
565 } | 554 } |
566 return result; | 555 return result; |
567 } | 556 } |
568 | 557 |
569 // We never resolve Mirror by its handle so to avoid memory leaks caused by Mirr
ors in the cache we disable it. | 558 // We never resolve Mirror by its handle so to avoid memory leaks caused by Mirr
ors in the cache we disable it. |
570 ToggleMirrorCache(false); | 559 ToggleMirrorCache(false); |
571 | 560 |
572 return DebuggerScript; | 561 return DebuggerScript; |
573 })(); | 562 })(); |
OLD | NEW |