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

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

Issue 104543002: Change the zone that late-added stream subscription callbacks are registered in. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add tests Created 7 years 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 | tests/lib/async/stream_listen_zone_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/stream_impl.dart
diff --git a/sdk/lib/async/stream_impl.dart b/sdk/lib/async/stream_impl.dart
index fd104b0edc6ef9a30fa5f41c709d440268899391..3d7a2b377535a320b1cfa4581d2c76bb32006b38 100644
--- a/sdk/lib/async/stream_impl.dart
+++ b/sdk/lib/async/stream_impl.dart
@@ -144,17 +144,17 @@ class _BufferingStreamSubscription<T> implements StreamSubscription<T>,
void onData(void handleData(T event)) {
if (handleData == null) handleData = _nullDataHandler;
- _onData = Zone.current.registerUnaryCallback(handleData);
+ _onData = _zone.registerUnaryCallback(handleData);
}
void onError(Function handleError) {
if (handleError == null) handleError = _nullErrorHandler;
- _onError = _registerErrorHandler(handleError, Zone.current);
+ _onError = _registerErrorHandler(handleError, _zone);
}
void onDone(void handleDone()) {
if (handleDone == null) handleDone = _nullDoneHandler;
- _onDone = Zone.current.registerCallback(handleDone);
+ _onDone = _zone.registerCallback(handleDone);
}
void pause([Future resumeSignal]) {
« no previous file with comments | « no previous file | tests/lib/async/stream_listen_zone_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698