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

Unified Diff: test/cctest/test-extra.js

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:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-extra.js
diff --git a/test/cctest/test-extra.js b/test/cctest/test-extra.js
index b3752d97b28d96b38ca97b71739d0e139bee8eef..0cc4df4cc4937ec6b6f04ddc4fde91f7c794e8e7 100644
--- a/test/cctest/test-extra.js
+++ b/test/cctest/test-extra.js
@@ -65,11 +65,16 @@
return (arg1 === arg2 && arg2 === 'x') ? 3 : -1;
}, null, new v8.InternalPackedArray('x', 'x')));
+ const rejectedButHandledPromise = v8.createPromise();
+ v8.rejectPromise(rejectedButHandledPromise, 4);
+ v8.markPromiseAsHandled(rejectedButHandledPromise);
+
return {
privateSymbol: v8.createPrivateSymbol('sym'),
fulfilledPromise, // should be fulfilled with 1
fulfilledPromise2, // should be fulfilled with 2
- rejectedPromise // should be rejected with 3
+ rejectedPromise, // should be rejected with 3
+ rejectedButHandledPromise // should be rejected but have a handler
};
};
})
« no previous file with comments | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698