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

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

Issue 23875032: Expose Zones. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Users can't customize runGuarded. More tests. Created 7 years, 3 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
Index: sdk/lib/async/future.dart
diff --git a/sdk/lib/async/future.dart b/sdk/lib/async/future.dart
index 6b6c760dadb760119dcc4140a9ee492121fd5368..03e23e76252497165bf33abe4d4853c9a73298cd 100644
--- a/sdk/lib/async/future.dart
+++ b/sdk/lib/async/future.dart
@@ -194,12 +194,15 @@ abstract class Future<T> {
// List collecting values from the futures.
// Set to null if an error occurs.
List values;
- void handleError(error) {
+
+ handleError(error) {
if (values != null) {
values = null;
completer.completeError(error);
}
+ return null;
}
+
// As each future completes, put its value into the corresponding
// position in the list of values.
int remaining = 0;
@@ -365,7 +368,7 @@ abstract class Future<T> {
*
* If you already have a Future, you probably don't need a Completer.
* Instead, you can usually use [Future.then], which returns a Future:
- *
+ *
* Future doStuff(){
* return someAsyncOperation().then((result) {
* // Do something.

Powered by Google App Engine
This is Rietveld 408576698