| 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-analyze-environment-liveness | |
| 6 | 5 |
| 7 // Test that debug-evaluate correctly collects free outer variables | 6 // Test that debug-evaluate correctly collects free outer variables |
| 8 // and does not get confused by variables in nested scopes. | 7 // and does not get confused by variables in nested scopes. |
| 9 | 8 |
| 10 Debug = debug.Debug | 9 Debug = debug.Debug |
| 11 | 10 |
| 12 var exception = null; | 11 var exception = null; |
| 13 function listener(event, exec_state, event_data, data) { | 12 function listener(event, exec_state, event_data, data) { |
| 14 if (event != Debug.DebugEvent.Break) return; | 13 if (event != Debug.DebugEvent.Break) return; |
| 15 try { | 14 try { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 32 let x = 3; | 31 let x = 3; |
| 33 (() => x); | 32 (() => x); |
| 34 } | 33 } |
| 35 debugger; | 34 debugger; |
| 36 })(); | 35 })(); |
| 37 })(); | 36 })(); |
| 38 })(); | 37 })(); |
| 39 | 38 |
| 40 Debug.setListener(null); | 39 Debug.setListener(null); |
| 41 assertNull(exception); | 40 assertNull(exception); |
| OLD | NEW |