| 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 --allow-natives-syntax --harmony-async-await | 5 // Flags: --harmony-async-await |
| 6 | 6 |
| 7 var Debug = debug.Debug; | 7 var Debug = debug.Debug; |
| 8 var step_count = 0; | 8 var step_count = 0; |
| 9 | 9 |
| 10 function listener(event, execState, eventData, data) { | 10 function listener(event, execState, eventData, data) { |
| 11 if (event != Debug.DebugEvent.Break) return; | 11 if (event != Debug.DebugEvent.Break) return; |
| 12 try { | 12 try { |
| 13 var line = execState.frame(0).sourceLineText(); | 13 var line = execState.frame(0).sourceLineText(); |
| 14 print(line); | 14 print(line); |
| 15 var [match, expected_count, step] = /\/\/ B(\d) (\w+)$/.exec(line); | 15 var [match, expected_count, step] = /\/\/ B(\d) (\w+)$/.exec(line); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 30 await // B3 StepNext | 30 await // B3 StepNext |
| 31 5; // B2 StepNext | 31 5; // B2 StepNext |
| 32 return a; // B4 StepNext | 32 return a; // B4 StepNext |
| 33 } // B5 Continue | 33 } // B5 Continue |
| 34 | 34 |
| 35 f(); | 35 f(); |
| 36 | 36 |
| 37 %RunMicrotasks(); | 37 %RunMicrotasks(); |
| 38 | 38 |
| 39 assertEquals(6, step_count); | 39 assertEquals(6, step_count); |
| OLD | NEW |