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

Unified Diff: runtime/bin/socket_patch.dart

Issue 3014593002: Use generic functions in zones. (Closed)
Patch Set: Added changes missing from patch set #2 Created 3 years, 3 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/dev_compiler/tool/input_sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/async/future.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 93b23b27837ef2be2b44d1f5b36cd70f2b59d947..8d0e77f1c337a4a7d9e06a104e5ed8f732ddd90c 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -1136,14 +1136,14 @@ class _RawServerSocket extends Stream<RawSocket> implements RawServerSocket {
onCancel: _onSubscriptionStateChange,
onPause: _onPauseStateChange,
onResume: _onPauseStateChange);
- _socket.setHandlers(read: zone.bindCallback(() {
+ _socket.setHandlers(read: zone.bindCallbackGuarded(() {
while (_socket.available > 0) {
var socket = _socket.accept();
if (socket == null) return;
_controller.add(new _RawSocket(socket));
if (_controller.isPaused) return;
}
- }), error: zone.bindUnaryCallback((e) {
+ }), error: zone.bindUnaryCallbackGuarded((e) {
_controller.addError(e);
_controller.close();
}), destroyed: () {
@@ -1237,7 +1237,7 @@ class _RawSocket extends Stream<RawSocketEvent> implements RawSocket {
_controller.add(RawSocketEvent.CLOSED);
_controller.close();
},
- error: zone.bindUnaryCallback((e) {
+ error: zone.bindUnaryCallbackGuarded((e) {
_controller.addError(e);
_socket.close();
}));
@@ -1734,7 +1734,7 @@ class _RawDatagramSocket extends Stream implements RawDatagramSocket {
_controller.add(RawSocketEvent.CLOSED);
_controller.close();
},
- error: zone.bindUnaryCallback((e) {
+ error: zone.bindUnaryCallbackGuarded((e) {
_controller.addError(e);
_socket.close();
}));
« no previous file with comments | « pkg/dev_compiler/tool/input_sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/async/future.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698