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

dart2js should mangle/copy data when sending it through SendPorts. #9245

Closed
floitschG opened this issue Mar 18, 2013 · 4 comments
Closed

dart2js should mangle/copy data when sending it through SendPorts. #9245

floitschG opened this issue Mar 18, 2013 · 4 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-isolate

Comments

@floitschG
Copy link
Contributor

dart2js should mangle/copy data when sending it through SendPorts. This is true, even when it sends to a SendPort that has its ReceivePort in the same isolate:

import 'dart:isolate';

main() {
  ReceivePort p = new ReceivePort();
  SendPort s = p.toSendPort();
  var t = [];
  t.add(t);
  p.receive((msg, _) {
    Expect.isFalse(identical(t, msg));
    p.close();
  });
  s.send(t);
}

@DartBot
Copy link

DartBot commented Mar 18, 2013

This comment was originally written by ngeoffray@google.com


Why is that? Is that part of the specification?

@floitschG
Copy link
Contributor Author

I don't think there something like a specification for isolates yet.
But it seems reasonable to assume that something that goes into a SendPort is copied and cannot interfere with my local copy. I shouldn't need to know the target of SendPorts.

@lrhn
Copy link
Member

lrhn commented Apr 30, 2014

Added Library-Isolate label.

@floitschG
Copy link
Contributor Author

Fixed in r42209.


Added Fixed label.

@floitschG floitschG added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-isolate labels Dec 10, 2014
This issue was closed.
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. library-isolate
Projects
None yet
Development

No branches or pull requests

3 participants