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 var exception = null; | 7 var exception = null; |
10 var log; | 8 var log; |
11 | 9 |
12 function listener(event, exec_state, event_data, data) { | 10 function listener(event, exec_state, event_data, data) { |
13 if (event != Debug.DebugEvent.Exception) return; | 11 if (event != Debug.DebugEvent.Exception) return; |
14 try { | 12 try { |
15 var line = exec_state.frame(0).sourceLineText(); | 13 var line = exec_state.frame(0).sourceLineText(); |
16 var match = /Exception (\w)/.exec(line); | 14 var match = /Exception (\w)/.exec(line); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 throw foo | 133 throw foo |
136 } | 134 } |
137 confused(); | 135 confused(); |
138 Promise.resolve().then(() => { | 136 Promise.resolve().then(() => { |
139 Debug.setListener(listener); | 137 Debug.setListener(listener); |
140 Debug.setBreakOnUncaughtException(); | 138 Debug.setBreakOnUncaughtException(); |
141 resolve(); | 139 resolve(); |
142 }); | 140 }); |
143 | 141 |
144 assertEquals([], log); | 142 assertEquals([], log); |
OLD | NEW |