OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Flags: --expose-debug-as debug | 5 // Flags: --expose-debug-as debug |
6 | 6 |
7 Debug = debug.Debug; | 7 Debug = debug.Debug; |
8 ScopeType = debug.ScopeType; | 8 ScopeType = debug.ScopeType; |
9 var exception = null; | 9 var exception = null; |
10 var nested = false; | 10 var nested = false; |
(...skipping 16 matching lines...) Expand all Loading... |
27 if (event != Debug.DebugEvent.Break) return; | 27 if (event != Debug.DebugEvent.Break) return; |
28 try { | 28 try { |
29 if (!nested) { | 29 if (!nested) { |
30 nested = true; | 30 nested = true; |
31 checkScopes(exec_state.frame(0).allScopes(), | 31 checkScopes(exec_state.frame(0).allScopes(), |
32 [ ScopeType.With, ScopeType.Local, ScopeType.Closure, | 32 [ ScopeType.With, ScopeType.Local, ScopeType.Closure, |
33 ScopeType.Script, ScopeType.Global ]); | 33 ScopeType.Script, ScopeType.Global ]); |
34 exec_state.frame(0).evaluate("debugger;"); | 34 exec_state.frame(0).evaluate("debugger;"); |
35 } else { | 35 } else { |
36 checkScopes(exec_state.frame(0).allScopes(), | 36 checkScopes(exec_state.frame(0).allScopes(), |
37 [ ScopeType.With, ScopeType.Closure, | 37 [ ScopeType.Eval, ScopeType.With, ScopeType.Closure, |
38 ScopeType.Script, ScopeType.Global ]); | 38 ScopeType.Script, ScopeType.Global ]); |
39 } | 39 } |
40 } catch (e) { | 40 } catch (e) { |
41 exception = e; | 41 exception = e; |
42 print(e + e.stack); | 42 print(e + e.stack); |
43 } | 43 } |
44 } | 44 } |
45 | 45 |
46 Debug.setListener(listener); | 46 Debug.setListener(listener); |
47 bar(); | 47 bar(); |
48 Debug.setListener(null); | 48 Debug.setListener(null); |
49 assertNull(exception); | 49 assertNull(exception); |
OLD | NEW |