9f56280609
R=iposva@google.com Review URL: https://codereview.chromium.org//1073983010 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45224 260f80e4-7a28-3924-810f-c04153c831b5
25 lines
741 B
Dart
25 lines
741 B
Dart
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
import 'dart:mirrors';
|
|
import 'dart:isolate';
|
|
import 'package:expect/expect.dart';
|
|
|
|
child(SendPort port) {
|
|
LibraryMirror root = currentMirrorSystem().isolate.rootLibrary;
|
|
Expect.isNotNull(root);
|
|
port.send(root.uri.toString());
|
|
}
|
|
|
|
main() {
|
|
var port;
|
|
port = new RawReceivePort((String childRootUri) {
|
|
LibraryMirror root = currentMirrorSystem().isolate.rootLibrary;
|
|
Expect.isNotNull(root);
|
|
Expect.equals(root.uri.toString(), childRootUri);
|
|
port.close();
|
|
});
|
|
|
|
Isolate.spawn(child, port.sendPort);
|
|
} |