| Index: sdk/lib/convert/byte_conversion.dart
|
| diff --git a/sdk/lib/convert/byte_conversion.dart b/sdk/lib/convert/byte_conversion.dart
|
| index d36f3ccd4efd44e102470c9f0643fda7ec674bda..edf297e1f8e91de6812bf6eca302bb9cae38a802 100644
|
| --- a/sdk/lib/convert/byte_conversion.dart
|
| +++ b/sdk/lib/convert/byte_conversion.dart
|
| @@ -25,8 +25,8 @@ abstract class ByteConversionSink extends ChunkedConversionSink<List<int>> {
|
| *
|
| * If [isLast] is `true` closes `this`.
|
| *
|
| - * The given [chunk] is not held onto. Once the method returns, it is safe to
|
| - * overwrite the data in it.
|
| + * Contrary to `add` the given [chunk] must not be held onto. Once the method
|
| + * returns, it is safe to overwrite the data in it.
|
| */
|
| void addSlice(List<int> chunk, int start, int end, bool isLast);
|
|
|
| @@ -44,11 +44,7 @@ abstract class ByteConversionSinkBase extends ByteConversionSink {
|
| void close();
|
|
|
| void addSlice(List<int> chunk, int start, int end, bool isLast) {
|
| - if (start != 0 || end != chunk.length) {
|
| - add(chunk.sublist(start, end));
|
| - } else {
|
| - add(chunk);
|
| - }
|
| + add(chunk.sublist(start, end));
|
| if (isLast) close();
|
| }
|
| }
|
|
|