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

Unified Diff: utils/pub/error_group.dart

Issue 12452008: Stop working around issue 8512. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | « pkg/scheduled_test/lib/src/mock_clock.dart ('k') | utils/pub/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/error_group.dart
diff --git a/utils/pub/error_group.dart b/utils/pub/error_group.dart
index dc0ba8a7fce1ef46e5212b5eb8051c80d58c1775..5e6baf859f51da72e6fbd29cb3a6cc02441fc689 100644
--- a/utils/pub/error_group.dart
+++ b/utils/pub/error_group.dart
@@ -232,10 +232,6 @@ class _ErrorGroupStream extends Stream {
/// Whether [this] has any listeners.
bool get _hasListeners => _controller.hasSubscribers;
- // TODO(nweiz): Remove this when issue 8512 is fixed.
- /// Whether the subscription has been cancelled.
- bool _cancelled = false;
-
/// Creates a new [_ErrorGroupFuture] that's a child of [_group] and wraps
/// [inner].
_ErrorGroupStream(this._group, Stream inner)
@@ -243,15 +239,13 @@ class _ErrorGroupStream extends Stream {
new StreamController.broadcast() :
new StreamController() {
_subscription = inner.listen((v) {
- if (!_cancelled) _controller.add(v);
+ _controller.add(v);
}, onError: (e) {
- if (!_cancelled) _group._signalError(e);
+ _group._signalError(e);
}, onDone: () {
- if (!_cancelled) {
- _isDone = true;
- _group._signalStreamComplete(this);
- _controller.close();
- }
+ _isDone = true;
+ _group._signalStreamComplete(this);
+ _controller.close();
});
}
@@ -268,7 +262,6 @@ class _ErrorGroupStream extends Stream {
/// unless it's already complete.
void _signalError(AsyncError e) {
if (_isDone) return;
- _cancelled = true;
_subscription.cancel();
// Call these asynchronously to work around issue 7913.
defer(() {
« no previous file with comments | « pkg/scheduled_test/lib/src/mock_clock.dart ('k') | utils/pub/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698