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

Unified Diff: sdk/lib/io/http_parser.dart

Issue 14103010: Change hasSubscribers to hasListener. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments. 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 | « sdk/lib/io/file_impl.dart ('k') | sdk/lib/io/io_sink.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http_parser.dart
diff --git a/sdk/lib/io/http_parser.dart b/sdk/lib/io/http_parser.dart
index 5dc129be6f8948b4b7f523ee34a6600cf1b82f05..dd55494c7010d4af1b56b99533e8d90df0c5b4db 100644
--- a/sdk/lib/io/http_parser.dart
+++ b/sdk/lib/io/http_parser.dart
@@ -166,7 +166,7 @@ class _HttpDetachedIncoming extends Stream<List<int>> {
}
void onSubscriptionStateChange() {
- if (controller.hasSubscribers) {
+ if (controller.hasListener) {
resume();
} else {
subscription.cancel();
@@ -912,7 +912,7 @@ class _HttpParser
}
void _bodySubscriptionStateChange() {
- if (_incoming != null && !_bodyController.hasSubscribers) {
+ if (_incoming != null && !_bodyController.hasListener) {
_closeIncoming();
} else {
_updateParsePauseState();
@@ -921,13 +921,13 @@ class _HttpParser
void _updateParsePauseState() {
if (_bodyController != null) {
- if (_bodyController.hasSubscribers && !_bodyController.isPaused) {
+ if (_bodyController.hasListener && !_bodyController.isPaused) {
_continueParsing();
} else {
_pauseParsing();
}
} else {
- if (_controller.hasSubscribers && !_controller.isPaused) {
+ if (_controller.hasListener && !_controller.isPaused) {
_continueParsing();
} else {
_pauseParsing();
« no previous file with comments | « sdk/lib/io/file_impl.dart ('k') | sdk/lib/io/io_sink.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698