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

Unified Diff: sdk/lib/io/websocket_impl.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/io_sink.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/websocket_impl.dart
diff --git a/sdk/lib/io/websocket_impl.dart b/sdk/lib/io/websocket_impl.dart
index 3842b605569cb0d769fe29550f4c7aa4a4234ba0..3cef0ad606f7c15279ad9d2e3311d67a442466af 100644
--- a/sdk/lib/io/websocket_impl.dart
+++ b/sdk/lib/io/websocket_impl.dart
@@ -585,13 +585,12 @@ class _WebSocketConsumer implements StreamConsumer {
bool _done([error]) {
if (_completer == null) return false;
- var tmp = _completer;
- _completer = null;
if (error != null) {
- tmp.completeError(error);
+ _completer.completeError(error);
} else {
- tmp.complete(webSocket);
+ _completer.complete(webSocket);
}
+ _completer = null;
return true;
}
« no previous file with comments | « sdk/lib/io/io_sink.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698