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

Unified Diff: sdk/lib/async/future.dart

Issue 12317139: Make sure Future.forEach properly pipes exceptions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | tests/lib/async/futures_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/future.dart
diff --git a/sdk/lib/async/future.dart b/sdk/lib/async/future.dart
index 820ba0087d17181fbc5b5d92e6bfdad8b51a4906..b28b2c5c53ef2b1a6ffa46559084e6a812cf553b 100644
--- a/sdk/lib/async/future.dart
+++ b/sdk/lib/async/future.dart
@@ -190,7 +190,8 @@ abstract class Future<T> {
Iterator iterator = input.iterator;
void nextElement(_) {
if (iterator.moveNext()) {
- f(iterator.current).then(nextElement, onError: doneSignal._setError);
+ new Future.of(() => f(iterator.current))
+ .then(nextElement, onError: doneSignal._setError);
} else {
doneSignal._setValue(null);
}
« no previous file with comments | « no previous file | tests/lib/async/futures_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698