Index: test/mjsunit/es6/debug-promises/promise-all-uncaught.js |
diff --git a/test/mjsunit/es6/debug-promises/promise-all-uncaught.js b/test/mjsunit/es6/debug-promises/promise-all-uncaught.js |
index fce2a5da5ada4094ec86ac6fb6cdab39276f2698..c201d13e053c5d59c4e6406497f0a3f46bbb7889 100644 |
--- a/test/mjsunit/es6/debug-promises/promise-all-uncaught.js |
+++ b/test/mjsunit/es6/debug-promises/promise-all-uncaught.js |
@@ -16,19 +16,6 @@ var Debug = debug.Debug; |
var expected_events = 1; |
var log = []; |
-var p1 = Promise.resolve(); |
-p1.name = "p1"; |
- |
-var p2 = p1.then(function() { |
- log.push("throw"); |
- throw new Error("uncaught"); // event |
-}); |
- |
-p2.name = "p2"; |
- |
-var p3 = Promise.all([p2]); |
-p3.name = "p3"; |
- |
function listener(event, exec_state, event_data, data) { |
if (event != Debug.DebugEvent.Exception) return; |
try { |
@@ -48,6 +35,19 @@ function listener(event, exec_state, event_data, data) { |
Debug.setBreakOnUncaughtException(); |
Debug.setListener(listener); |
+var p1 = Promise.resolve(); |
+p1.name = "p1"; |
+ |
+var p2 = p1.then(function() { |
+ log.push("throw"); |
+ throw new Error("uncaught"); // event |
+}); |
+ |
+p2.name = "p2"; |
+ |
+var p3 = Promise.all([p2]); |
+p3.name = "p3"; |
+ |
log.push("end main"); |
function testDone(iteration) { |