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

Unified Diff: src/js/promise.js

Issue 2267033002: Remove --promise-extra flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix syntax for skip Created 4 years, 4 months 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 a666080e78654b0474a48badc009058a416ab39c..b50fc80b305bdcfd509e479cfb703171b85eac9b 100644
--- a/src/js/promise.js
+++ b/src/js/promise.js
@@ -346,18 +346,6 @@ function NewPromiseCapability(C) {
return result;
}
-// Unspecified V8-specific legacy function
-function PromiseDefer() {
- %IncrementUseCounter(kPromiseDefer);
- return NewPromiseCapability(this);
-}
-
-// Unspecified V8-specific legacy function
-function PromiseAccept(x) {
- %IncrementUseCounter(kPromiseAccept);
- return %_Call(PromiseResolve, this, x);
-}
-
// ES#sec-promise.reject
// Promise.reject ( x )
function PromiseReject(r) {
@@ -443,13 +431,6 @@ function PromiseThen(onResolve, onReject) {
return PerformPromiseThen(this, onResolve, onReject, resultCapability);
}
-// Unspecified V8-specific legacy function
-// Chain is left around for now as an alias for then
-function PromiseChain(onResolve, onReject) {
- %IncrementUseCounter(kPromiseChain);
- return %_Call(PromiseThen, this, onResolve, onReject);
-}
-
// ES#sec-promise.prototype.catch
// Promise.prototype.catch ( onRejected )
function PromiseCatch(onReject) {
@@ -615,7 +596,6 @@ utils.InstallFunctions(GlobalPromise.prototype, DONT_ENUM, [
%InstallToContext([
"promise_catch", PromiseCatch,
- "promise_chain", PromiseChain,
"promise_create", PromiseCreate,
"promise_has_user_defined_reject_handler", PromiseHasUserDefinedRejectHandler,
"promise_reject", RejectPromise,
@@ -634,15 +614,7 @@ utils.InstallFunctions(extrasUtils, 0, [
"rejectPromise", RejectPromise
]);
-// TODO(v8:4567): Allow experimental natives to remove function prototype
-[PromiseChain, PromiseDefer, PromiseAccept].forEach(
- fn => %FunctionRemovePrototype(fn));
-
utils.Export(function(to) {
- to.PromiseChain = PromiseChain;
- to.PromiseDefer = PromiseDefer;
- to.PromiseAccept = PromiseAccept;
-
to.PromiseCastResolved = PromiseCastResolved;
to.PromiseThen = PromiseThen;
« 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