Index: src/js/promise.js |
diff --git a/src/js/promise.js b/src/js/promise.js |
index 256d9c08c27dd9a5264ca88ba792adf23f53441a..582a1e8efa7608725977241402bf1438e352075d 100644 |
--- a/src/js/promise.js |
+++ b/src/js/promise.js |
@@ -444,8 +444,6 @@ function PromiseHasUserDefinedRejectHandler() { |
DONT_ENUM | READ_ONLY); |
utils.InstallFunctions(GlobalPromise, DONT_ENUM, [ |
- "defer", PromiseDeferred, |
- "accept", PromiseResolved, |
"reject", PromiseRejected, |
"all", PromiseAll, |
"race", PromiseRace, |
@@ -453,7 +451,6 @@ utils.InstallFunctions(GlobalPromise, DONT_ENUM, [ |
]); |
utils.InstallFunctions(GlobalPromise.prototype, DONT_ENUM, [ |
- "chain", PromiseChain, |
"then", PromiseThen, |
"catch", PromiseCatch |
]); |
@@ -477,4 +474,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; |
+}); |
+ |
}) |