Index: src/js/promise.js |
diff --git a/src/js/promise.js b/src/js/promise.js |
index f0c9bb3b520ca1bda70fff1ad1f3baae3933a00d..794f57b6fc0f3197e8f8d8651c9414fb7dcc3f5c 100644 |
--- a/src/js/promise.js |
+++ b/src/js/promise.js |
@@ -446,8 +446,6 @@ function PromiseHasUserDefinedRejectHandler() { |
DONT_ENUM | READ_ONLY); |
utils.InstallFunctions(GlobalPromise, DONT_ENUM, [ |
- "defer", PromiseDeferred, |
- "accept", PromiseResolved, |
"reject", PromiseRejected, |
"all", PromiseAll, |
"race", PromiseRace, |
@@ -455,14 +453,12 @@ utils.InstallFunctions(GlobalPromise, DONT_ENUM, [ |
]); |
utils.InstallFunctions(GlobalPromise.prototype, DONT_ENUM, [ |
- "chain", PromiseChain, |
"then", PromiseThen, |
"catch", PromiseCatch |
]); |
%InstallToContext([ |
"promise_catch", PromiseCatch, |
- "promise_chain", PromiseChain, |
"promise_create", PromiseCreate, |
"promise_has_user_defined_reject_handler", PromiseHasUserDefinedRejectHandler, |
"promise_reject", PromiseReject, |
@@ -479,4 +475,14 @@ utils.InstallFunctions(extrasUtils, 0, [ |
"rejectPromise", PromiseReject |
]); |
+// TODO(v8:4567): Allow experimental natives to remove function prototype |
+[PromiseChain, PromiseDeferred, PromiseResolved].forEach( |
+ fn => %FunctionRemovePrototype(fn)); |
+ |
+utils.Export(function(to) { |
+ to.PromiseChain = PromiseChain; |
+ to.PromiseDeferred = PromiseDeferred; |
+ to.PromiseResolved = PromiseResolved; |
+}); |
+ |
}) |