Skip to content

print silently kills spawnUri isolate in Dartium #14080

Closed
@DartBot

Description

@DartBot

This issue was originally filed by [email protected]


What steps will reproduce the problem?
There is a file test.dart:
import 'dart:isolate';

void main(){
  port.receive((String map, SendPort send){
    print("Received: $map");
    send.send("Test");
  });
}

A file server.dart:
import 'dart:async';
import 'dart:io';

void main() {
  HttpServer.bind("localhost", 9998)
      .then((server) {
        print("http://${server.address}:${server.port}/");
        server.listen(
            (request) {
// request.response.headers.set(HttpHeaders.CONTENT_TYPE, "application/dart");
              new File("test.dart").openRead().pipe(request.response);
            });
      });
}

A command line test:
import 'dart:isolate';

void main(){
  var spawn=spawnUri("http://localhost:9998/");
  spawn.call("Hallo").then((map){
     print(map);
  });
}

And a web test (with all the example application stuff and this dart file):
import 'dart:html';
import 'dart:isolate';

void main() {
  query("#sample_text_id")
    ..text = "Click me!"
    ..onClick.listen(reverseText);
}

void reverseText(MouseEvent event) {
  var spawn=spawnUri("http://localhost:9998/");
  spawn.call("Hallo").then((map){
     print(map);
     query("#sample_text_id").text = map.toString();
  });
}

What is the expected output? What do you see instead?
The output of the web version should be the same as the web version:
Received: Hallo
Test

What version of the product are you using? On what operating system?
Dart SDK version 0.8.1.2_r28355 on MacOS X

The only message you get is that the script is transferred as text/plain, but I also tried application/dart which did not change anything..

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions