Chromium Code Reviews| Index: src/promise.js |
| diff --git a/src/promise.js b/src/promise.js |
| index 50f91ae0ba3443f4b9113b6395e68af396bb71a8..29f641d55d6a8ff3343d38e33b348d05607f4640 100644 |
| --- a/src/promise.js |
| +++ b/src/promise.js |
| @@ -200,10 +200,8 @@ function PromiseHandle(value, handler, deferred) { |
| // Multi-unwrapped chaining with thenable coercion. |
| function PromiseThen(onResolve, onReject) { |
| - onResolve = |
| - IS_NULL_OR_UNDEFINED(onResolve) ? PromiseIdResolveHandler : onResolve; |
| - onReject = |
| - IS_NULL_OR_UNDEFINED(onReject) ? PromiseIdRejectHandler : onReject; |
| + if (typeof onResolve !== 'function') onResolve = PromiseIdResolveHandler; |
|
arv (Not doing code reviews)
2014/03/27 21:10:46
Maybe we should add an IsCallable macro?
|
| + if (typeof onReject !== 'function') onReject = PromiseIdRejectHandler; |
| var that = this; |
| var constructor = this.constructor; |
| return %_CallFunction( |