Chromium Code Reviews| Index: sdk/lib/convert/utf.dart |
| diff --git a/sdk/lib/convert/utf.dart b/sdk/lib/convert/utf.dart |
| index 8e480f80333904569054ec0557754049fac40049..b24d40e9d960f0c64aec28f84e32f03b8b7eed38 100644 |
| --- a/sdk/lib/convert/utf.dart |
| +++ b/sdk/lib/convert/utf.dart |
| @@ -134,7 +134,12 @@ class _Utf8Encoder { |
| _Utf8Encoder.withBufferSize(int bufferSize) |
| // TODO(11971, floitsch): use Uint8List instead of normal lists. |
|
floitsch
2014/01/31 13:03:49
Remove TODO.
|
| - : _buffer = new List<int>(bufferSize); |
| + : _buffer = _createBuffer(bufferSize); |
| + |
| + /** |
| + * Allow an implementation to pick the most efficient way of storing bytes. |
|
floitsch
2014/01/31 13:03:49
Maybe add a TODO(11971): just always use a Uint8Li
|
| + */ |
| + external static List<int> _createBuffer(int size); |
| /** |
| * Tries to combine the given [leadingSurrogate] with the [nextCodeUnit] and |