| 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 that uses new.target fails. | 6 // Test that live-editing a frame that uses new.target fails. |
| 8 | 7 |
| 9 Debug = debug.Debug | 8 Debug = debug.Debug |
| 10 var calls = 0; | 9 var calls = 0; |
| 11 var exceptions = 0; | 10 var exceptions = 0; |
| 12 var results = []; | 11 var results = []; |
| 13 var replace_again; | 12 var replace_again; |
| 14 | 13 |
| 15 eval(` | 14 eval(` |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 new LogNewTarget(); | 65 new LogNewTarget(); |
| 67 | 66 |
| 68 replace_again = true; | 67 replace_again = true; |
| 69 Reflect.construct(LogNewTarget, [], Dummy); | 68 Reflect.construct(LogNewTarget, [], Dummy); |
| 70 | 69 |
| 71 assertEquals( | 70 assertEquals( |
| 72 [false, LogNewTarget, true, undefined, true, LogNewTarget, true, Dummy], | 71 [false, LogNewTarget, true, undefined, true, LogNewTarget, true, Dummy], |
| 73 results); | 72 results); |
| 74 assertEquals(4, calls); // No restarts | 73 assertEquals(4, calls); // No restarts |
| 75 assertEquals(3, exceptions); // Replace failed. | 74 assertEquals(3, exceptions); // Replace failed. |
| OLD | NEW |