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

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

Issue 14103010: Change hasSubscribers to hasListener. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/async/stream.dart
diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart
index 228bdfb03884f5586d46c1c86d7a716dd1c85be5..8a463ebe85aa279aecf1b272823abf35a9639800 100644
--- a/sdk/lib/async/stream.dart
+++ b/sdk/lib/async/stream.dart
@@ -132,7 +132,7 @@ abstract class Stream<T> {
}
},
onSubscriptionStateChange: () {
- if (controller.hasSubscribers) {
+ if (controller.hasListener) {
watch.start();
startPeriodicTimer();
} else {
@@ -984,7 +984,7 @@ abstract class StreamEventTransformer<S, T> implements StreamTransformer<S, T> {
}
},
onSubscriptionStateChange: () {
- if (controller.hasSubscribers) {
+ if (controller.hasListener) {
subscription = transformingStream.listen(
controller.add,
onError: controller.addError,

Powered by Google App Engine
This is Rietveld 408576698