Revision: 19788
Author: [email protected]
Date: Tue Mar 11 10:41:18 2014 UTC
Log: PromiseCoerce should ignore primitive values.
PromiseCource(x) should return "not a thenable" if Type(x) is not Object
even if x.then exists.
BUG=347095
LOG=Y
[email protected]
Review URL: https://codereview.chromium.org/194403002
Patch from Yutaka Hirano <[email protected]>.
http://code.google.com/p/v8/source/detail?r=19788
Modified:
/branches/bleeding_edge/src/promise.js
=======================================
--- /branches/bleeding_edge/src/promise.js Mon Mar 10 12:01:06 2014 UTC
+++ /branches/bleeding_edge/src/promise.js Tue Mar 11 10:41:18 2014 UTC
@@ -217,7 +217,7 @@
PromiseCoerce.table = new $WeakMap;
function PromiseCoerce(constructor, x) {
- if (!(IsPromise(x) || IS_NULL_OR_UNDEFINED(x))) {
+ if (!IsPromise(x) && IS_SPEC_OBJECT(x)) {
var then = x.then;
if (typeof then === 'function') {
if (PromiseCoerce.table.has(x)) {
--
--
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.