Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dart:typed_data sublist and other methods return inconsistent implementation types in Dartium and Dart2JS #10354

Closed
vsmenon opened this issue May 1, 2013 · 6 comments

Comments

@vsmenon
Copy link
Member

@vsmenon vsmenon commented May 1, 2013

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

@kasperl

This comment has been minimized.

Copy link
Contributor

@kasperl kasperl commented May 1, 2013

cc @vsmenon.

@kasperl

This comment has been minimized.

Copy link
Contributor

@kasperl kasperl commented May 1, 2013

Hehe. I missed the fact that this was filed by Vijay.

@floitschG

This comment has been minimized.

Copy link
Contributor

@floitschG floitschG commented May 22, 2013

Dart2js' library should behave the same way as Dartium.


Added Ready-to-implement, Accepted labels.

@rakudrama

This comment has been minimized.

Copy link
Member

@rakudrama rakudrama commented Jul 2, 2013

@vsmenon

This comment has been minimized.

Copy link
Member Author

@vsmenon vsmenon commented Jul 8, 2013

Stephen: is this issue now fixed?

@lrhn

This comment has been minimized.

Copy link
Member

@lrhn lrhn commented Aug 19, 2013

Added AssumedStale label.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.