Index: sdk/lib/io/bytes_builder.dart |
diff --git a/sdk/lib/io/bytes_builder.dart b/sdk/lib/io/bytes_builder.dart |
index 684e27da93e199792aa781a6ac3a2e716726d333..a4b611fc505c9f386dc55adb45420398d62e08df 100644 |
--- a/sdk/lib/io/bytes_builder.dart |
+++ b/sdk/lib/io/bytes_builder.dart |
@@ -153,17 +153,14 @@ class _CopyingBytesBuilder implements BytesBuilder { |
class _BytesBuilder implements BytesBuilder { |
int _length = 0; |
- final List<Uint8List> _chunks = []; |
+ final _chunks = <List<int>>[]; |
void add(List<int> bytes) { |
- Uint8List typedBytes; |
- if (bytes is Uint8List) { |
- typedBytes = bytes; |
- } else { |
+ if (bytes is! Uint8List) { |
bytes = new Uint8List.fromList(bytes); |
} |
- _chunks.add(typedBytes); |
- _length += typedBytes.length; |
+ _chunks.add(bytes); |
+ _length += bytes.length; |
} |
void addByte(int byte) { add([byte]); } |