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

Unified Diff: src/js/promise.js

Issue 2596553002: [promises] Move Promise.prototype.catch to TF (Closed)
Patch Set: fix nits Created 4 years 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/builtins/builtins-promise.cc ('k') | test/mjsunit/harmony/async-await-species.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 41d106bdefeecf8d517e3f4e6104e1d0ba0e4893..9bf378025f48504f8e25e65923e5344846138391 100644
--- a/src/js/promise.js
+++ b/src/js/promise.js
@@ -142,12 +142,6 @@ function PromiseReject(r) {
}
}
-// ES#sec-promise.prototype.catch
-// Promise.prototype.catch ( onRejected )
-function PromiseCatch(onReject) {
- return this.then(UNDEFINED, onReject);
-}
-
// Combinators.
// ES#sec-promise.resolve
@@ -345,10 +339,7 @@ utils.InstallFunctions(GlobalPromise, DONT_ENUM, [
"resolve", PromiseResolve
]);
-%SetCode(GlobalPromise.prototype.catch, PromiseCatch);
-
%InstallToContext([
- "promise_catch", GlobalPromise.prototype.catch,
"promise_create", PromiseCreate,
"promise_has_user_defined_reject_handler", PromiseHasUserDefinedRejectHandler,
"promise_reject", DoRejectPromise,
« no previous file with comments | « src/builtins/builtins-promise.cc ('k') | test/mjsunit/harmony/async-await-species.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698