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

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

Issue 11740027: Rename unsubscribe to cancel. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Fix error message. Created 7 years, 12 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/stream_pipe.dart
diff --git a/sdk/lib/async/stream_pipe.dart b/sdk/lib/async/stream_pipe.dart
index 2e2269a663ba1310b682af64548fa0b8d088a5fb..1215194e6bd240031d4d5ec2d47ff4a2de2951db 100644
--- a/sdk/lib/async/stream_pipe.dart
+++ b/sdk/lib/async/stream_pipe.dart
@@ -27,9 +27,9 @@ abstract class _ForwardingStream<S, T> extends _MultiStreamImpl<T>
}
void _subscribeToSource() {
- _subscription = _source.subscribe(onData: this._handleData,
- onError: this._handleError,
- onDone: this._handleDone);
+ _subscription = _source.listen(this._handleData,
+ onError: this._handleError,
+ onDone: this._handleDone);
if (_isPaused) {
_subscription.pause();
}
@@ -56,7 +56,7 @@ abstract class _ForwardingStream<S, T> extends _MultiStreamImpl<T>
}
} else {
if (_subscription != null) {
- _subscription.unsubscribe();
+ _subscription.cancel();
_subscription = null;
}
}

Powered by Google App Engine
This is Rietveld 408576698