Index: test/mjsunit/harmony/debug-async-function-async-task-event.js |
diff --git a/test/mjsunit/harmony/debug-async-function-async-task-event.js b/test/mjsunit/harmony/debug-async-function-async-task-event.js |
index 90e13d8659a3f81856e1bdc3b8f972405f3cfe9c..b99f52fb31344d526dbbeac05c139e821793160b 100644 |
--- a/test/mjsunit/harmony/debug-async-function-async-task-event.js |
+++ b/test/mjsunit/harmony/debug-async-function-async-task-event.js |
@@ -43,6 +43,7 @@ function assertLog(msg) { |
function listener(event, exec_state, event_data, data) { |
if (event != Debug.DebugEvent.AsyncTaskEvent) return; |
try { |
+ if ("Promise.resolve" == event_data.name()) return; |
if (base_id < 0) |
base_id = event_data.id(); |
var id = event_data.id() - base_id + 1; |
@@ -73,3 +74,24 @@ resolver(); |
%RunMicrotasks(); |
assertNull(exception); |
+ |
+Debug.clearBreakOnUncaughtException(); |
+Debug.setListener(null); |
+ |
+var resolve; |
+var turnOnListenerPromise = new Promise(r => resolve = r); |
+async function confused() { |
+ await turnOnListenerPromise; |
+ throw foo |
+} |
+ |
+confused(); |
+ |
+Promise.resolve().then(() => { |
+ Debug.setListener(listener); |
+ Debug.setBreakOnUncaughtException(); |
+ resolve(); |
+}); |
+ |
+%RunMicrotasks(); |
+assertNull(exception); |