Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Unified Diff: src/promise.js

Issue 181613006: Promise.all and Promise.race use "then" rather than "chain". (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) }
);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698