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) { |