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

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

Issue 14057010: Re-write _BufferList to keep an internal Uint8List buffer, that will grow on demand. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix comment 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') | 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 a1a2308086c6b1285640cad870da482bcca5a002..52587ed0306ac45ac6785fc993e6dd343bbc512b 100644
--- a/sdk/lib/io/websocket_impl.dart
+++ b/sdk/lib/io/websocket_impl.dart
@@ -277,11 +277,7 @@ class _WebSocketProtocolTransformer extends StreamEventTransformer {
sink.add(_buffer.toString());
break;
case _WebSocketMessageType.BINARY:
- if (_buffer.length == 0) {
- sink.add(const []);
- } else {
- sink.add(_buffer.readBytes(_buffer.length));
- }
+ sink.add(_buffer.readBytes());
break;
}
_buffer = null;
« no previous file with comments | « sdk/lib/io/file_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698