Revert "PromiseThen should ignore non-function parameters."

Wrong Blink test expectations, need to fix later.

TBR=machenbach@chromium.org
BUG=

Review URL: https://codereview.chromium.org/251813004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21028 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
rossberg@chromium.org 2014-04-28 15:57:25 +00:00
parent 38b82f40d0
commit cf3a3a8844
3 changed files with 4 additions and 26 deletions

View File

@ -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(

View File

@ -396,30 +396,6 @@ function assertAsyncDone(iteration) {
assertAsyncRan()
})();
(function() {
var deferred = Promise.defer()
var p1 = deferred.promise
var p2 = p1.then(1, 2)
p2.then(
function(x) { assertAsync(x === 5, "then/resolve-non-function") },
assertUnreachable
)
deferred.resolve(5)
assertAsyncRan()
})();
(function() {
var deferred = Promise.defer()
var p1 = deferred.promise
var p2 = p1.then(1, 2)
p2.then(
assertUnreachable,
function(x) { assertAsync(x === 5, "then/reject-non-function") }
)
deferred.reject(5)
assertAsyncRan()
})();
(function() {
var deferred = Promise.defer()
var p1 = deferred.promise

View File

@ -28,5 +28,7 @@
[
[ALWAYS, {
# http://crbug.com/347455
'2.2.7': FAIL
}], # ALWAYS
]