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

Unified Diff: sdk/lib/io/io_sink.dart

Issue 14196003: Change StreamController constructor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix some bugs. Created 7 years, 8 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/io/io_sink.dart
diff --git a/sdk/lib/io/io_sink.dart b/sdk/lib/io/io_sink.dart
index df3a7daac36faf6ca070c8c62cc851098e742dfa..843856825397c21d94adc386c1ca23a8d0898893 100644
--- a/sdk/lib/io/io_sink.dart
+++ b/sdk/lib/io/io_sink.dart
@@ -194,8 +194,10 @@ class _IOSinkImpl<T> implements IOSink<T> {
StreamController<List<int>> get _controller {
if (_controllerInstance == null) {
_controllerInstance = new StreamController<List<int>>(
- onPauseStateChange: _onPauseStateChange,
- onSubscriptionStateChange: _onSubscriptionStateChange);
+ onListen: _onSubscriptionStateChange,
+ onPause: _onPauseStateChange,
+ onResume: _onPauseStateChange,
+ onCancel: _onSubscriptionStateChange);
var future = _controller.stream.pipe(_target);
future.then((_) => _completeWriteStreamCompleter(),
onError: (error) => _completeWriteStreamCompleter(error));

Powered by Google App Engine
This is Rietveld 408576698