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

Unified Diff: runtime/bin/socket_patch.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 | « no previous file | sdk/lib/io/file_impl.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 d10f3ae710576ff4fd5d22f7c942cc51fc789d99..3de4c29597c8148429f16abbd40ccc6adb65e37c 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -867,13 +867,12 @@ class _SocketStreamConsumer extends StreamConsumer<List<int>> {
void done([error]) {
if (streamCompleter != null) {
- var tmp = streamCompleter;
- streamCompleter = null;
if (error != null) {
- tmp.completeError(error);
+ streamCompleter.completeError(error);
} else {
- tmp.complete(socket);
+ streamCompleter.complete(socket);
}
+ streamCompleter = null;
}
}
« no previous file with comments | « no previous file | sdk/lib/io/file_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698