to misc
At the moment it seems that if i want my code to work both on dartium and chrome, i have to do this:
new Uint8List.fromList(new Uint8List.view(buffer).sublist(read, read+toRead));
sublist returns List<int> which seems to work on dartium but chrome throws exception when attempting to access lengthInBytes since the object is now JSArray
The text was updated successfully, but these errors were encountered:
Dartium's sublist returns a typed_data list. Dart2JS returns a non typed_data list.
The API only promises a List: http://api.dartlang.org/docs/releases/latest/dart_typed_data/Int8List.html#sublist
This leads to surprising behavior:
Sami Ylönen <sami.ylonen@gmail.com>
to misc
At the moment it seems that if i want my code to work both on dartium and chrome, i have to do this:
new Uint8List.fromList(new Uint8List.view(buffer).sublist(read, read+toRead));
sublist returns List<int> which seems to work on dartium but chrome throws exception when attempting to access lengthInBytes since the object is now JSArray
The text was updated successfully, but these errors were encountered: