Index: src/promise.js |
diff --git a/src/promise.js b/src/promise.js |
index 82aa99027a1305ac8bf6b95672cccd89504173cd..1f6c3514ac42f52dfa291476c99f3b30395872ce 100644 |
--- a/src/promise.js |
+++ b/src/promise.js |
@@ -254,7 +254,7 @@ function PromiseAll(values) { |
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 @@ function PromiseOne(values) { |
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) } |
); |