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

Unified Diff: runtime/bin/socket_patch.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
« no previous file with comments | « no previous file | sdk/lib/async/stream.dart » ('j') | sdk/lib/async/stream_controller.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_patch.dart
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart
index 81e8ab379728d001376dd6c6a8b4179a6f799f6d..22246ed97605e5d7c1c2fcf8284f48bab0351044 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -432,8 +432,10 @@ class _RawServerSocket extends Stream<RawSocket>
_RawServerSocket(this._socket) {
_controller = new StreamController(
- onSubscriptionStateChange: _onSubscriptionStateChange,
- onPauseStateChange: _onPauseStateChange);
+ onListen: _onSubscriptionStateChange,
+ onCancel: _onSubscriptionStateChange,
+ onPause: _onPauseStateChange,
+ onResume: _onPauseStateChange);
_socket.closeFuture.then((_) => _controller.close());
_socket.setHandlers(
read: () {
@@ -501,8 +503,10 @@ class _RawSocket extends Stream<RawSocketEvent>
_RawSocket(this._socket) {
_controller = new StreamController(
- onSubscriptionStateChange: _onSubscriptionStateChange,
- onPauseStateChange: _onPauseStateChange);
+ onListen: _onSubscriptionStateChange,
+ onCancel: _onSubscriptionStateChange,
+ onPause: _onPauseStateChange,
+ onResume: _onPauseStateChange);
_socket.closeFuture.then((_) => _controller.close());
_socket.setHandlers(
read: () => _controller.add(RawSocketEvent.READ),
@@ -768,8 +772,10 @@ class _Socket extends Stream<List<int>> implements Socket {
_Socket(RawSocket this._raw) {
_controller = new StreamController<List<int>>(
- onSubscriptionStateChange: _onSubscriptionStateChange,
- onPauseStateChange: _onPauseStateChange);
+ onListen: _onSubscriptionStateChange,
+ onCancel: _onSubscriptionStateChange,
+ onPause: _onPauseStateChange,
+ onResume: _onPauseStateChange);
_consumer = new _SocketStreamConsumer(this);
_sink = new IOSink(_consumer);
« no previous file with comments | « no previous file | sdk/lib/async/stream.dart » ('j') | sdk/lib/async/stream_controller.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698