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

Unified Diff: sdk/lib/_internal/pub/lib/src/utils.dart

Issue 581283003: Get rid of Chain.track in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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/_internal/pub/lib/src/utils.dart
diff --git a/sdk/lib/_internal/pub/lib/src/utils.dart b/sdk/lib/_internal/pub/lib/src/utils.dart
index a6fa15dc9ff1b737a146e82f3e7fd1dfd07030d5..aea04010794a0f3284673ed13b826bed1c4ca84c 100644
--- a/sdk/lib/_internal/pub/lib/src/utils.dart
+++ b/sdk/lib/_internal/pub/lib/src/utils.dart
@@ -85,10 +85,6 @@ class FutureGroup<T> {
/// under the covers.
Future newFuture(callback()) => new Future.value().then((_) => callback());
-/// Like [new Future.sync], but automatically wraps the future in a
-/// [Chain.track] call.
-Future syncFuture(callback()) => Chain.track(new Future.sync(callback));
-
/// Runs [callback] in an error zone and pipes any unhandled error to the
/// returned [Future].
///
@@ -346,8 +342,8 @@ Future<Map> mapFromIterableAsync(Iterable iter, {key(element),
var map = new Map();
return Future.wait(iter.map((element) {
return Future.wait([
- syncFuture(() => key(element)),
- syncFuture(() => value(element))
+ new Future.sync(() => key(element)),
+ new Future.sync(() => value(element))
]).then((results) {
map[results[0]] = results[1];
});
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/source/path.dart ('k') | sdk/lib/_internal/pub/lib/src/validator/compiled_dartdoc.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698