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

Unified Diff: test/cctest/test-api.cc

Issue 2498143002: Add markPromiseAsHandled V8 extra util (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add tests Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « src/js/promise.js ('k') | test/cctest/test-extra.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 354db4344f98c403665a0bd0a4e6b3c1ff69d4ee..437848b8c05f451fdcf802d4730ede607691e59a 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -25396,6 +25396,12 @@ TEST(ExtrasUtilsObject) {
rejected_promise->Catch(env.local(), store).ToLocalChecked();
isolate->RunMicrotasks();
CHECK_EQ(3, CompileRun("result")->Int32Value(env.local()).FromJust());
+
+ auto rejected_but_handled_promise =
+ result->Get(env.local(), v8_str("rejectedButHandledPromise"))
+ .ToLocalChecked()
+ .As<v8::Promise>();
+ CHECK_EQ(true, rejected_but_handled_promise->HasHandler());
}
« no previous file with comments | « src/js/promise.js ('k') | test/cctest/test-extra.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698