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:js - TypedData (Uint8List) is transfered directly in VM but proxied in dart2js compiled code #15644

Closed
DartBot opened this issue Dec 15, 2013 · 2 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant core-n library-js type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Dec 15, 2013

This issue was originally filed by ross.dart....@gmail.com


1.0.3_r30939
Windows 7x64

The documentation of dart:js states:

"The following types are transferred directly and not proxied:

...
TypedData, including its subclasses like Int32List, but not ByteBuffer
..."

I have a proxy to a FileReader object (necessary for Chrome API interaction). When I call readAsArrayBuffer I get back an object of Type Uint8List in Dartium and of type JsObject when compiled via dart2js.

This is closely related to issue #15053 ...

thanks,

@floitschG
Copy link
Contributor

Added Area-Library, Library-JS, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Jan 27, 2014

This comment was originally written by dev...@futureperfect.info


I posted this in issue #15053 but I'll copy it here for completeness; these bugs are caused by the same line of code so can probably be merged. The problem is in js_dart2js.dart:

https://code.google.com/p/dart/source/browse/branches/bleeding_edge/dart/sdk/lib/js/dart2js/js_dart2js.dart

In the function _convertToDart the test for _isLocalObject returns false. This is possibly a Chrome App specific issue. If I modify the code as follows, the issue goes away:

  } else if (/_isLocalObject(o)
      &&
/ (o is Blob || o is Event || o is KeyRange || o is ImageData
      || o is Node || o is TypedData || o is Window)) {
    // long line: dart2js doesn't allow string concatenation in the JS() form
    return JS('Blob|Event|KeyRange|ImageData|Node|TypedData|Window', '#', o);
  }

@DartBot DartBot added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-js labels Jan 27, 2014
@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed priority-unassigned labels Feb 29, 2016
@lrhn lrhn added the core-m label Aug 11, 2017
@floitschG floitschG added core-n and removed core-m labels Aug 28, 2017
@matanlurey matanlurey added the closed-obsolete Closed as the reported issue is no longer relevant label Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant core-n library-js type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

5 participants