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

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

Issue 15680002: Remove explicit delayed futures in dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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/http_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 ff0fcddd8f7710acb2c93a043f44c549367a73f2..58622cf3e068a850254033cbce123ca8ac428b36 100644
--- a/sdk/lib/io/http_parser.dart
+++ b/sdk/lib/io/http_parser.dart
@@ -105,8 +105,7 @@ class _HttpDetachedIncoming extends Stream<List<int>> {
Completer resumeCompleter;
_HttpDetachedIncoming(StreamSubscription this.subscription,
- List<int> this.carryOverData,
- Completer oldResumeCompleter) {
+ List<int> this.carryOverData) {
controller = new StreamController<List<int>>(
onListen: resume,
onPause: pause,
@@ -118,7 +117,6 @@ class _HttpDetachedIncoming extends Stream<List<int>> {
controller.close();
} else {
pause();
- if (oldResumeCompleter != null) oldResumeCompleter.complete();
subscription.resume();
subscription.onData(controller.add);
subscription.onDone(controller.close);
@@ -792,11 +790,8 @@ class _HttpParser
void set responseToMethod(String method) { _responseToMethod = method; }
_HttpDetachedIncoming detachIncoming() {
- var completer = _pauseCompleter;
- _pauseCompleter = null;
return new _HttpDetachedIncoming(_socketSubscription,
- readUnparsedData(),
- completer);
+ readUnparsedData());
}
List<int> readUnparsedData() {
@@ -993,7 +988,6 @@ class _HttpParser
StreamSubscription _socketSubscription;
bool _paused = true;
bool _bodyPaused = false;
- Completer _pauseCompleter;
StreamController<_HttpIncoming> _controller;
StreamController<List<int>> _bodyController;
}
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | sdk/lib/io/io_sink.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698