| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // Note: the following comment is used by test.dart to additionally compile the | 5 // Note: the following comment is used by test.dart to additionally compile the |
| 6 // other isolate's code. | 6 // other isolate's code. |
| 7 // OtherScripts=issue_12474_child.dart | 7 // OtherScripts=issue_12474_child.dart |
| 8 // OtherScripts=package/issue_12474_lib.dart | 8 // OtherScripts=package/issue_12474_lib.dart |
| 9 | 9 |
| 10 import 'dart:isolate'; | 10 import 'dart:isolate'; |
| 11 | 11 |
| 12 final SPAWN_PACKAGE_ROOT = Uri.parse("."); | 12 final SPAWN_PACKAGE_ROOT = Uri.parse("."); |
| 13 | 13 |
| 14 void main([args, port]) { | 14 void main([args, port]) { |
| 15 var p = new ReceivePort(); | 15 var p = new ReceivePort(); |
| 16 Isolate.spawnUri(Uri.parse("issue_12474_child.dart"), | 16 Isolate.spawnUri(Uri.parse("issue_12474_child.dart"), [p.sendPort], {}, |
| 17 [p.sendPort], | 17 packageRoot: SPAWN_PACKAGE_ROOT); |
| 18 {}, | |
| 19 packageRoot: SPAWN_PACKAGE_ROOT); | |
| 20 p.listen((msg) { | 18 p.listen((msg) { |
| 21 print("Received message"); | 19 print("Received message"); |
| 22 p.close(); | 20 p.close(); |
| 23 }); | 21 }); |
| 24 } | 22 } |
| OLD | NEW |