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

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: Address comments and rebase. 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') | no next file with comments »
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 a381e184b9be0a87708cd5b10ef3566e62d69d78..779469a709a1dc10f255dab7eb87ef13e9fbf62c 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),
@@ -761,8 +765,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698