Commit cf3a3a88 authored by rossberg@chromium.org's avatar rossberg@chromium.org

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
parent 38b82f40
......@@ -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(
......
......@@ -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
......
......@@ -28,5 +28,7 @@
[
[ALWAYS, {
# http://crbug.com/347455
'2.2.7': FAIL
}], # ALWAYS
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment