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

Unified Diff: runtime/bin/buffer_list.dart

Issue 9495007: Prepare the HTTP library for inclusion in the standalone VM (step 2) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 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 | runtime/bin/stream_util.dart » ('j') | runtime/bin/stream_util.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/buffer_list.dart
diff --git a/runtime/bin/buffer_list.dart b/runtime/bin/buffer_list.dart
index fc63dec1e9163ea0f396ffb17e1043745c7bf0b8..a6ec59010ff1fd40114581e88de33bd8066e71f8 100644
--- a/runtime/bin/buffer_list.dart
+++ b/runtime/bin/buffer_list.dart
@@ -74,6 +74,10 @@ class _BufferList {
result = _buffers.first().getRange(_index, count);
_index += count;
_length -= count;
+ if (_index == _buffers.first().length) {
+ _buffers.removeFirst();
+ _index = 0;
+ }
return result;
} else {
result = new ByteArray(count);
« no previous file with comments | « no previous file | runtime/bin/stream_util.dart » ('j') | runtime/bin/stream_util.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698