Chromium Code Reviews| Index: runtime/bin/file_impl.dart |
| diff --git a/runtime/bin/file_impl.dart b/runtime/bin/file_impl.dart |
| index bc83f38cb885d594b20f1d82d7d68257e00da57f..682c2ea3657138676fd31325b43ba5d0b5e320d4 100644 |
| --- a/runtime/bin/file_impl.dart |
| +++ b/runtime/bin/file_impl.dart |
| @@ -72,7 +72,9 @@ class _FileInputStream extends _BaseDataInputStream implements InputStream { |
| future.then((read) { |
| _filePosition += read; |
| if (read != _data.length) { |
| - _data.removeRange(read, _data.length - read); |
| + var oldData = _data; |
|
Anders Johnsen
2012/06/12 13:42:33
What about
_data = _data.getRange(0, read);
Bill Hesse
2012/06/12 13:47:45
I don't know if that would be a Uint8List. Since
Anders Johnsen
2012/06/12 13:51:24
.getRange() is a object of same type (see runtime/
|
| + _data = new Uint8List(read); |
| + _data.fillRange(0, read, oldData, 0); |
| } |
| _position = 0; |