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 --no-always-opt | 5 // Flags: --no-always-opt |
6 | 6 |
7 // Test that the (strict) eval scope is visible to the debugger. | 7 // Test that the (strict) eval scope is visible to the debugger. |
8 | 8 |
9 var Debug = debug.Debug; | 9 var Debug = debug.Debug; |
10 var exception = null; | 10 var exception = null; |
11 var delegate = null; | 11 var delegate = null; |
12 | 12 |
13 function listener(event, exec_state, event_data, data) { | 13 function listener(event, exec_state, event_data, data) { |
14 if (event != Debug.DebugEvent.Break) return; | 14 if (event != Debug.DebugEvent.Break) return; |
15 try { | 15 try { |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 var g = eval("'use strict'; \n" + | 135 var g = eval("'use strict'; \n" + |
136 "var a = 1; \n" + | 136 "var a = 1; \n" + |
137 "() => { a; \n" + | 137 "() => { a; \n" + |
138 " debugger; \n" + | 138 " debugger; \n" + |
139 " assertEquals(3, a);\n" + | 139 " assertEquals(3, a);\n" + |
140 " } \n"); | 140 " } \n"); |
141 g(); | 141 g(); |
142 | 142 |
143 Debug.setListener(null); | 143 Debug.setListener(null); |
144 assertNull(exception); | 144 assertNull(exception); |
OLD | NEW |