OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 | 5 // Flags: --no-analyze-environment-liveness |
6 | 6 |
7 // Test that debug-evaluate only resolves variables that are used by | 7 // Test that debug-evaluate only resolves variables that are used by |
8 // the function inside which we debug-evaluate. This is to avoid | 8 // the function inside which we debug-evaluate. This is to avoid |
9 // incorrect variable resolution when a context-allocated variable is | 9 // incorrect variable resolution when a context-allocated variable is |
10 // shadowed by a stack-allocated variable. | 10 // shadowed by a stack-allocated variable. |
11 | 11 |
12 Debug = debug.Debug | 12 Debug = debug.Debug |
13 | 13 |
14 var exception = null; | 14 var exception = null; |
15 function listener(event, exec_state, event_data, data) { | 15 function listener(event, exec_state, event_data, data) { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 debugger; // ReferenceError | 74 debugger; // ReferenceError |
75 })(); // 2 | 75 })(); // 2 |
76 })(); // 1 | 76 })(); // 1 |
77 return y; | 77 return y; |
78 })(); | 78 })(); |
79 | 79 |
80 assertEquals("A", a); | 80 assertEquals("A", a); |
81 | 81 |
82 Debug.setListener(null); | 82 Debug.setListener(null); |
83 assertNull(exception); | 83 assertNull(exception); |
OLD | NEW |