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

Unified Diff: pkg/http/lib/src/utils.dart

Issue 94093007: Add stack chain support to pkg/watcher and pkg/http. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 | « pkg/http/lib/src/multipart_file.dart ('k') | pkg/http/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/lib/src/utils.dart
diff --git a/pkg/http/lib/src/utils.dart b/pkg/http/lib/src/utils.dart
index 6a801e194097fd05441b96ba35804b5b1c8a42de..d3a4307620121714b3ce208744703ce43c7534d4 100644
--- a/pkg/http/lib/src/utils.dart
+++ b/pkg/http/lib/src/utils.dart
@@ -9,6 +9,8 @@ import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
+import 'package:stack_trace/stack_trace.dart';
+
import 'byte_stream.dart';
/// Converts a URL query string (or `application/x-www-form-urlencoded` body)
@@ -213,3 +215,6 @@ Future forEachFuture(Iterable input, Future fn(element)) {
}
return nextElement(null);
}
+
+/// Like [Future.sync], but wraps the Future in [Chain.track] as well.
+Future syncFuture(callback()) => Chain.track(new Future.sync(callback));
Bob Nystrom 2013/12/05 17:35:46 Maybe this should be added to stack_trace itself?
nweiz 2013/12/05 19:27:45 I don't want to make it part of the public API sin
« no previous file with comments | « pkg/http/lib/src/multipart_file.dart ('k') | pkg/http/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698