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

Unified Diff: src/js/promise.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 | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/promise.js
diff --git a/src/js/promise.js b/src/js/promise.js
index d7e25124708737f8c5031e8d86d0d20b31176be1..0b37c643d10dcaa6bec39cbad845da534165c4d8 100644
--- a/src/js/promise.js
+++ b/src/js/promise.js
@@ -587,6 +587,10 @@ function PromiseHasUserDefinedRejectHandler() {
return PromiseHasUserDefinedRejectHandlerRecursive(this);
};
+function MarkPromiseAsHandled(promise) {
+ SET_PRIVATE(promise, promiseHasHandlerSymbol, true);
+}
+
function PromiseSpecies() {
return this;
@@ -632,7 +636,8 @@ utils.InstallFunctions(GlobalPromise.prototype, DONT_ENUM, [
utils.InstallFunctions(extrasUtils, 0, [
"createPromise", PromiseCreate,
"resolvePromise", ResolvePromise,
- "rejectPromise", DoRejectPromise
+ "rejectPromise", DoRejectPromise,
+ "markPromiseAsHandled", MarkPromiseAsHandled
]);
utils.Export(function(to) {
« no previous file with comments | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698