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

Unified Diff: sdk/lib/_internal/pub_generated/lib/src/error_group.dart

Issue 887223007: Revert "Use native async/await support in pub." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
Index: sdk/lib/_internal/pub_generated/lib/src/error_group.dart
diff --git a/sdk/lib/_internal/pub/lib/src/error_group.dart b/sdk/lib/_internal/pub_generated/lib/src/error_group.dart
similarity index 93%
copy from sdk/lib/_internal/pub/lib/src/error_group.dart
copy to sdk/lib/_internal/pub_generated/lib/src/error_group.dart
index c479a24e9969eefe12e8d788c4520d482bcb6b6a..7efebf3cd6bb18dd3ae95f0403d3f73becb21264 100644
--- a/sdk/lib/_internal/pub/lib/src/error_group.dart
+++ b/sdk/lib/_internal/pub_generated/lib/src/error_group.dart
@@ -69,8 +69,8 @@ class ErrorGroup {
/// error, it's a [StateError] to try to register a new [Future].
Future registerFuture(Future future) {
if (_isDone) {
- throw new StateError("Can't register new members on a complete "
- "ErrorGroup.");
+ throw new StateError(
+ "Can't register new members on a complete " "ErrorGroup.");
}
var wrapped = new _ErrorGroupFuture(this, future);
@@ -92,8 +92,8 @@ class ErrorGroup {
/// error, it's a [StateError] to try to register a new [Stream].
Stream registerStream(Stream stream) {
if (_isDone) {
- throw new StateError("Can't register new members on a complete "
- "ErrorGroup.");
+ throw new StateError(
+ "Can't register new members on a complete " "ErrorGroup.");
}
var wrapped = new _ErrorGroupStream(this, stream);
@@ -136,7 +136,9 @@ class ErrorGroup {
_isDone = true;
_done._signalError(error, stackTrace);
- if (!caught && !_done._hasListeners) scheduleMicrotask((){ throw error; });
+ if (!caught && !_done._hasListeners) scheduleMicrotask(() {
+ throw error;
+ });
}
/// Notifies [this] that one of its member [Future]s is complete.
@@ -257,12 +259,12 @@ class _ErrorGroupStream extends Stream {
/// Creates a new [_ErrorGroupFuture] that's a child of [_group] and wraps
/// [inner].
_ErrorGroupStream(this._group, Stream inner)
- : _controller = new StreamController(sync: true) {
+ : _controller = new StreamController(sync: true) {
// Use old-style asBroadcastStream behavior - cancel source _subscription
// the first time the stream has no listeners.
- _stream = inner.isBroadcast
- ? _controller.stream.asBroadcastStream(onCancel: (sub) => sub.cancel())
- : _controller.stream;
+ _stream = inner.isBroadcast ?
+ _controller.stream.asBroadcastStream(onCancel: (sub) => sub.cancel()) :
+ _controller.stream;
_subscription = inner.listen((v) {
_controller.add(v);
}, onError: (e, [stackTrace]) {
@@ -274,10 +276,10 @@ class _ErrorGroupStream extends Stream {
});
}
- StreamSubscription listen(void onData(value),
- {Function onError, void onDone(),
- bool cancelOnError}) {
- return _stream.listen(onData,
+ StreamSubscription listen(void onData(value), {Function onError, void
+ onDone(), bool cancelOnError}) {
+ return _stream.listen(
+ onData,
onError: onError,
onDone: onDone,
cancelOnError: true);
« no previous file with comments | « sdk/lib/_internal/pub_generated/lib/src/entrypoint.dart ('k') | sdk/lib/_internal/pub_generated/lib/src/exceptions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698