| 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: --harmony-async-await --expose-debug-as debug | 5 // Flags: --harmony-async-await --expose-debug-as debug |
| 6 | 6 |
| 7 var Debug = debug.Debug; | 7 var Debug = debug.Debug; |
| 8 | 8 |
| 9 var AsyncFunction = (async function() {}).constructor; | |
| 10 | |
| 11 async function thrower() { throw 'Exception'; } | 9 async function thrower() { throw 'Exception'; } |
| 12 | 10 |
| 13 async function test(name, func, args, handler, continuation) { | 11 async function test(name, func, args, handler, continuation) { |
| 14 var handler_called = false; | 12 var handler_called = false; |
| 15 var exception = null; | 13 var exception = null; |
| 16 | 14 |
| 17 function listener(event, exec_state, event_data, data) { | 15 function listener(event, exec_state, event_data, data) { |
| 18 try { | 16 try { |
| 19 if (event == Debug.DebugEvent.Break) { | 17 if (event == Debug.DebugEvent.Break) { |
| 20 handler_called = true; | 18 handler_called = true; |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 assertTrue(response.body.object.ref < 0); | 605 assertTrue(response.body.object.ref < 0); |
| 608 } else { | 606 } else { |
| 609 assertTrue(response.body.object.ref >= 0); | 607 assertTrue(response.body.object.ref >= 0); |
| 610 } | 608 } |
| 611 var found = false; | 609 var found = false; |
| 612 for (var i = 0; i < response.refs.length && !found; i++) { | 610 for (var i = 0; i < response.refs.length && !found; i++) { |
| 613 found = response.refs[i].handle == response.body.object.ref; | 611 found = response.refs[i].handle == response.body.object.ref; |
| 614 } | 612 } |
| 615 assertTrue(found, "Scope object " + response.body.object.ref + " not found"); | 613 assertTrue(found, "Scope object " + response.body.object.ref + " not found"); |
| 616 } | 614 } |
| OLD | NEW |