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 --allow-natives-syntax | |
6 | 5 |
7 // Test that live-editing a frame above one that uses new.target succeeds. | 6 // Test that live-editing a frame above one that uses new.target succeeds. |
8 | 7 |
9 Debug = debug.Debug | 8 Debug = debug.Debug |
10 var wrapper_calls = 0; | 9 var wrapper_calls = 0; |
11 var construct_calls = 0; | 10 var construct_calls = 0; |
12 var exceptions = 0; | 11 var exceptions = 0; |
13 var results = []; | 12 var results = []; |
14 var replace_again; | 13 var replace_again; |
15 | 14 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 assertEquals(2, wrapper_calls); | 63 assertEquals(2, wrapper_calls); |
65 assertEquals(0, exceptions); // Replace succeeds | 64 assertEquals(0, exceptions); // Replace succeeds |
66 assertEquals([LogNewTarget, LogNewTarget], results); | 65 assertEquals([LogNewTarget, LogNewTarget], results); |
67 | 66 |
68 replace_again = true; | 67 replace_again = true; |
69 Wrapper(); | 68 Wrapper(); |
70 assertEquals(3, construct_calls); | 69 assertEquals(3, construct_calls); |
71 assertEquals(4, wrapper_calls); // Restarts | 70 assertEquals(4, wrapper_calls); // Restarts |
72 assertEquals(0, exceptions); // Replace succeeds | 71 assertEquals(0, exceptions); // Replace succeeds |
73 assertEquals([LogNewTarget, LogNewTarget, LogNewTarget], results); | 72 assertEquals([LogNewTarget, LogNewTarget, LogNewTarget], results); |
OLD | NEW |