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

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

Issue 18031023: Remove _BufferList from dart:io and now use BytesBuilder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use takeBytes not toBytes. Created 7 years, 5 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/buffer_list.dart ('k') | sdk/lib/io/file_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/bytes_builder.dart
diff --git a/sdk/lib/io/bytes_builder.dart b/sdk/lib/io/bytes_builder.dart
index a239db87b7cd324b6df666ed06a0a70e5bd59e2c..dd2a6e79e95f163cc41a0e27aca2daa4a27d65d4 100644
--- a/sdk/lib/io/bytes_builder.dart
+++ b/sdk/lib/io/bytes_builder.dart
@@ -66,8 +66,9 @@ class BytesBuilder {
List<int> takeBytes() {
if (_buffer == null) return new Uint8List(0);
var buffer = _buffer;
+ int length = _length;
clear();
- return new Uint8List.view(buffer.buffer, 0, _length);
+ return new Uint8List.view(buffer.buffer, 0, length);
Bill Hesse 2013/07/12 10:23:25 Very funny bug!
}
/**
« no previous file with comments | « sdk/lib/io/buffer_list.dart ('k') | sdk/lib/io/file_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698