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

Unified Diff: test/mjsunit/es6/debug-promises/throw-with-throw-in-reject.js

Issue 2161263003: [debug] use catch prediction flag for promise rejections. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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
Index: test/mjsunit/es6/debug-promises/throw-with-throw-in-reject.js
diff --git a/test/mjsunit/es6/debug-promises/throw-with-throw-in-reject.js b/test/mjsunit/es6/debug-promises/throw-with-throw-in-reject.js
index 5cf49f2faea10b4579092bbecf31d38b3fdd965e..e884045f10457ace580b711c259ca11f9f90b520 100644
--- a/test/mjsunit/es6/debug-promises/throw-with-throw-in-reject.js
+++ b/test/mjsunit/es6/debug-promises/throw-with-throw-in-reject.js
@@ -12,7 +12,7 @@
Debug = debug.Debug;
-var expected_events = 2;
+var expected_events = 1;
var log = [];
var p = new Promise(function(resolve, reject) {
@@ -45,12 +45,10 @@ function listener(event, exec_state, event_data, data) {
if (event == Debug.DebugEvent.Exception) {
expected_events--;
assertTrue(expected_events >= 0);
- if (expected_events == 1) {
+ if (expected_events == 0) {
assertEquals(["resolve", "construct", "end main",
"throw caught"], log);
assertEquals("caught", event_data.exception().message);
- } else if (expected_events == 0) {
- assertEquals("reject", event_data.exception().message);
Dan Ehrenberg 2016/07/21 21:07:33 Nice fix; this really isn't a rejection.
} else {
assertUnreachable();
}

Powered by Google App Engine
This is Rietveld 408576698