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

Unified Diff: src/js/promise.js

Issue 2596553002: [promises] Move Promise.prototype.catch to TF (Closed)
Patch Set: revert changes to test 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
Index: src/js/promise.js
diff --git a/src/js/promise.js b/src/js/promise.js
index 7cd789295644f8be560f8c85346fd9c279720024..8ff601bbbbb392acc2115b6973dcbf285abd3da2 100644
--- a/src/js/promise.js
+++ b/src/js/promise.js
@@ -150,12 +150,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
@@ -360,10 +354,7 @@ utils.InstallFunctions(GlobalPromise, DONT_ENUM, [
utils.InstallGetter(GlobalPromise, speciesSymbol, PromiseSpecies);
-%SetCode(GlobalPromise.prototype.catch, PromiseCatch);
-
%InstallToContext([
- "promise_catch", GlobalPromise.prototype.catch,
"promise_create", PromiseCreate,
"promise_has_user_defined_reject_handler", PromiseHasUserDefinedRejectHandler,
"promise_reject", DoRejectPromise,

Powered by Google App Engine
This is Rietveld 408576698