| Index: runtime/tests/vm/dart/isolate_mirror_remote_test.dart
|
| diff --git a/runtime/tests/vm/dart/isolate_mirror_remote_test.dart b/runtime/tests/vm/dart/isolate_mirror_remote_test.dart
|
| index f3fff3a0b1da06cce051549222ac81ea08ee212d..7b36cfd89f2664305a8217d865920b2845db011f 100644
|
| --- a/runtime/tests/vm/dart/isolate_mirror_remote_test.dart
|
| +++ b/runtime/tests/vm/dart/isolate_mirror_remote_test.dart
|
| @@ -11,11 +11,9 @@ import "package:expect/expect.dart";
|
| import 'dart:isolate';
|
| import 'dart:mirrors';
|
|
|
| -void isolateMain() {
|
| - port.receive(
|
| - (msg, replyPort) {
|
| - Expect.fail('Received unexpected message $msg in remote isolate.');
|
| - });
|
| +void isolateMain(SendPort replyTo) {
|
| + var port = new ReceivePort();
|
| + replyTo.send(port.sendPort);
|
| }
|
|
|
| void testMirrorSystem(MirrorSystem mirror) {
|
| @@ -23,11 +21,14 @@ void testMirrorSystem(MirrorSystem mirror) {
|
| }
|
|
|
| void main() {
|
| - SendPort sp = spawnFunction(isolateMain);
|
| - try {
|
| - mirrorSystemOf(sp).then(testMirrorSystem);
|
| - Expect.fail('Should not reach here. Remote isolates not implemented.');
|
| - } catch (exception) {
|
| - Expect.isTrue(exception is UnimplementedError);
|
| - }
|
| + var response = new ReceivePort();
|
| + Isolate.spawn(isolateMain, response.sendPort);
|
| + response.first.then((sp) {
|
| + try {
|
| + mirrorSystemOf(sp).then(testMirrorSystem);
|
| + Expect.fail('Should not reach here. Remote isolates not implemented.');
|
| + } catch (exception) {
|
| + Expect.isTrue(exception is UnimplementedError);
|
| + }
|
| + });
|
| }
|
|
|