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

Unified Diff: src/js/promise.js

Issue 1478533002: Reland of Disable non-standard Promise functions in staging (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « src/js/prologue.js ('k') | src/js/promise-extra.js » ('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 f0c9bb3b520ca1bda70fff1ad1f3baae3933a00d..794f57b6fc0f3197e8f8d8651c9414fb7dcc3f5c 100644
--- a/src/js/promise.js
+++ b/src/js/promise.js
@@ -446,8 +446,6 @@
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.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 @@
"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;
+});
+
})
« no previous file with comments | « src/js/prologue.js ('k') | src/js/promise-extra.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698