Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Unified Diff: test/mjsunit/es6/debug-promises/promise-race-uncaught.js

Issue 2350363002: Make Promise.all/Promise.race catch prediction conditional on DevTools (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/es6/debug-promises/promise-all-uncaught.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/debug-promises/promise-race-uncaught.js
diff --git a/test/mjsunit/es6/debug-promises/promise-race-uncaught.js b/test/mjsunit/es6/debug-promises/promise-race-uncaught.js
index b8a424f14d730888335e327ff71bc45b4585706b..ed6233bc306c09bafa39b17d95e2696242937347 100644
--- a/test/mjsunit/es6/debug-promises/promise-race-uncaught.js
+++ b/test/mjsunit/es6/debug-promises/promise-race-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.race([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.race([p2]);
+p3.name = "p3";
+
log.push("end main");
function testDone(iteration) {
« no previous file with comments | « test/mjsunit/es6/debug-promises/promise-all-uncaught.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698