Revision: 19752
Author: [email protected]
Date: Mon Mar 10 11:52:13 2014 UTC
Log: Promise.all and Promise race should use "then" rather
than "chain".
As specified, they should unwrap resolution values recursively.
BUG=347427
LOG=Y
[email protected]
Review URL: https://codereview.chromium.org/181613006
Patch from Yutaka Hirano <[email protected]>.
http://code.google.com/p/v8/source/detail?r=19752
Modified:
/branches/bleeding_edge/src/promise.js
=======================================
--- /branches/bleeding_edge/src/promise.js Wed Feb 12 22:04:19 2014 UTC
+++ /branches/bleeding_edge/src/promise.js Mon Mar 10 11:52:13 2014 UTC
@@ -254,7 +254,7 @@
deferred.resolve(resolutions);
} else {
for (var i = 0; i < values.length; ++i) {
- this.cast(values[i]).chain(
+ this.cast(values[i]).then(
function(i, x) {
resolutions[i] = x;
if (--count === 0) deferred.resolve(resolutions);
@@ -273,7 +273,7 @@
var deferred = %_CallFunction(this, PromiseDeferred);
try {
for (var i = 0; i < values.length; ++i) {
- this.cast(values[i]).chain(
+ this.cast(values[i]).then(
function(x) { deferred.resolve(x) },
function(r) { deferred.reject(r) }
);
--
--
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.