Chromium Code Reviews| Index: sdk/lib/isolate/isolate.dart |
| diff --git a/sdk/lib/isolate/isolate.dart b/sdk/lib/isolate/isolate.dart |
| index c67122049f1a8e543e21ceb2cbb1af7b176a25a8..d6b4c0b5b41e50ff1b0005640f2b9f614965559f 100644 |
| --- a/sdk/lib/isolate/isolate.dart |
| +++ b/sdk/lib/isolate/isolate.dart |
| @@ -127,6 +127,29 @@ class Isolate { |
| external static Isolate get current; |
| /** |
| + * Returns the package root of the current isolate, if any. |
| + * |
| + * If the isolate is using a [packageMap], this getter returns `null`, |
| + * otherwise it returns the package root - a directory that package |
| + * URIs are resolved against. |
| + */ |
| + external static Future<Uri> get packageRoot; |
|
nweiz
2015/10/06 23:33:21
Are there any guarantees about whether this is abs
Lasse Reichstein Nielsen
2015/10/07 07:48:28
It should be absolute. We should add this to the d
|
| + |
| + /** |
| + * Returns the package mapping of the current isolate, if any. |
| + * |
| + * If the current isolate is using a [packageRoot], this getter |
| + * returns `null`. |
| + * |
| + * The package map maps the name of a package that is available to the |
| + * program, to a URI that package URIs for that package are resolved against. |
| + * |
| + * Returns an empty map if the isolate does not have a way to resolve package |
| + * URIs. |
| + */ |
| + external static Future<Map<String, Uri>> get packageMap; |
| + |
| + /** |
| * Creates and spawns an isolate that shares the same code as the current |
| * isolate. |
| * |