Index: src/js/promise.js |
diff --git a/src/js/promise.js b/src/js/promise.js |
index 794f57b6fc0f3197e8f8d8651c9414fb7dcc3f5c..f0c9bb3b520ca1bda70fff1ad1f3baae3933a00d 100644 |
--- a/src/js/promise.js |
+++ b/src/js/promise.js |
@@ -446,6 +446,8 @@ |
DONT_ENUM | READ_ONLY); |
utils.InstallFunctions(GlobalPromise, DONT_ENUM, [ |
+ "defer", PromiseDeferred, |
+ "accept", PromiseResolved, |
"reject", PromiseRejected, |
"all", PromiseAll, |
"race", PromiseRace, |
@@ -453,12 +455,14 @@ |
]); |
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, |
@@ -475,14 +479,4 @@ |
"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; |
-}); |
- |
}) |