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 20 matching lines...) Expand all Loading... |
31 | 31 |
32 (function () { | 32 (function () { |
33 | 33 |
34 var DebuggerScript = {}; | 34 var DebuggerScript = {}; |
35 | 35 |
36 /** | 36 /** |
37 * @param {?CompileEvent} eventData | 37 * @param {?CompileEvent} eventData |
38 */ | 38 */ |
39 DebuggerScript.getAfterCompileScript = function(eventData) | 39 DebuggerScript.getAfterCompileScript = function(eventData) |
40 { | 40 { |
41 var script = eventData.script().value(); | 41 return eventData.script().value(); |
42 if (!script.is_debugger_script) | |
43 return script; | |
44 return null; | |
45 } | 42 } |
46 | 43 |
47 /** @type {!Map<!ScopeType, string>} */ | 44 /** @type {!Map<!ScopeType, string>} */ |
48 DebuggerScript._scopeTypeNames = new Map(); | 45 DebuggerScript._scopeTypeNames = new Map(); |
49 DebuggerScript._scopeTypeNames.set(ScopeType.Global, "global"); | 46 DebuggerScript._scopeTypeNames.set(ScopeType.Global, "global"); |
50 DebuggerScript._scopeTypeNames.set(ScopeType.Local, "local"); | 47 DebuggerScript._scopeTypeNames.set(ScopeType.Local, "local"); |
51 DebuggerScript._scopeTypeNames.set(ScopeType.With, "with"); | 48 DebuggerScript._scopeTypeNames.set(ScopeType.With, "with"); |
52 DebuggerScript._scopeTypeNames.set(ScopeType.Closure, "closure"); | 49 DebuggerScript._scopeTypeNames.set(ScopeType.Closure, "closure"); |
53 DebuggerScript._scopeTypeNames.set(ScopeType.Catch, "catch"); | 50 DebuggerScript._scopeTypeNames.set(ScopeType.Catch, "catch"); |
54 DebuggerScript._scopeTypeNames.set(ScopeType.Block, "block"); | 51 DebuggerScript._scopeTypeNames.set(ScopeType.Block, "block"); |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 break; | 561 break; |
565 } | 562 } |
566 return result; | 563 return result; |
567 } | 564 } |
568 | 565 |
569 // We never resolve Mirror by its handle so to avoid memory leaks caused by Mirr
ors in the cache we disable it. | 566 // 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); | 567 ToggleMirrorCache(false); |
571 | 568 |
572 return DebuggerScript; | 569 return DebuggerScript; |
573 })(); | 570 })(); |
OLD | NEW |