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 | |
6 | |
7 Debug = debug.Debug | 5 Debug = debug.Debug |
8 | 6 |
9 let events = 0; | 7 let events = 0; |
10 | 8 |
11 function listener(event, exec_state, event_data, data) { | 9 function listener(event, exec_state, event_data, data) { |
12 if (event != Debug.DebugEvent.Exception) return; | 10 if (event != Debug.DebugEvent.Exception) return; |
13 events++; | 11 events++; |
14 } | 12 } |
15 | 13 |
16 async function thrower() { | 14 async function thrower() { |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 Debug.clearBreakOnException(); | 204 Debug.clearBreakOnException(); |
207 } else { | 205 } else { |
208 Debug.clearBreakOnUncaughtException(); | 206 Debug.clearBreakOnUncaughtException(); |
209 } | 207 } |
210 if (expectedEvents != events) { | 208 if (expectedEvents != events) { |
211 %AbortJS(`producer ${producer} consumer ${consumer} expectedEvents ` + | 209 %AbortJS(`producer ${producer} consumer ${consumer} expectedEvents ` + |
212 `${expectedEvents} caught ${caught} events ${events}`); | 210 `${expectedEvents} caught ${caught} events ${events}`); |
213 } | 211 } |
214 } | 212 } |
215 } | 213 } |
OLD | NEW |