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

Unified Diff: src/promise.js

Issue 251813004: Revert "PromiseThen should ignore non-function parameters." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | « no previous file | test/mjsunit/es6/promises.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/promise.js
diff --git a/src/promise.js b/src/promise.js
index 076b216313779660f396c57f83cee82f00f1af4f..b87f9d65f93e8420a51257b36b80355354e1a938 100644
--- a/src/promise.js
+++ b/src/promise.js
@@ -215,9 +215,9 @@ function PromiseHandle(value, handler, deferred) {
function PromiseThen(onResolve, onReject) {
onResolve =
- IS_SPEC_FUNCTION(onResolve) ? onResolve : PromiseIdResolveHandler;
+ IS_NULL_OR_UNDEFINED(onResolve) ? PromiseIdResolveHandler : onResolve;
onReject =
- IS_SPEC_FUNCTION(onReject) ? onReject : PromiseIdRejectHandler;
+ IS_NULL_OR_UNDEFINED(onReject) ? PromiseIdRejectHandler : onReject;
var that = this;
var constructor = this.constructor;
return %_CallFunction(
« no previous file with comments | « no previous file | test/mjsunit/es6/promises.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698