Reviewers: Michael Achenbach,

Message:
Committed patchset #1 manually as r21028 (tree was closed).

Description:
Revert "PromiseThen should ignore non-function parameters."

Wrong Blink test expectations, need to fix later.

[email protected]
BUG=

Committed: https://code.google.com/p/v8/source/detail?r=21028

Please review this at https://codereview.chromium.org/251813004/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+4, -26 lines):
  M src/promise.js
  M test/mjsunit/es6/promises.js
  M test/promises-aplus/promises-aplus.status


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(
Index: test/mjsunit/es6/promises.js
diff --git a/test/mjsunit/es6/promises.js b/test/mjsunit/es6/promises.js
index 8575ba15ea885c4f7f1bb58c87409d772d6ccb98..ba5a306f84a23ecee98f11ddb1b1991afd394f1e 100644
--- a/test/mjsunit/es6/promises.js
+++ b/test/mjsunit/es6/promises.js
@@ -399,30 +399,6 @@ function assertAsyncDone(iteration) {
 (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
   var p2 = {then: function(onResolve, onReject) { onResolve(p1) }}
   var p3 = Promise.accept(p2)
   p3.chain(
Index: test/promises-aplus/promises-aplus.status
diff --git a/test/promises-aplus/promises-aplus.status b/test/promises-aplus/promises-aplus.status index fdcf40b13fec4afbb57aa6755d098649b82f2efe..c68eae96e670ee9117e5e10c1cf136aca5b317c3 100644
--- a/test/promises-aplus/promises-aplus.status
+++ b/test/promises-aplus/promises-aplus.status
@@ -28,5 +28,7 @@

 [
 [ALWAYS, {
+  # http://crbug.com/347455
+  '2.2.7': FAIL
 }],  # ALWAYS
 ]


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to