Chromium Code Reviews| Index: sdk/lib/isolate/isolate.dart |
| diff --git a/sdk/lib/isolate/isolate.dart b/sdk/lib/isolate/isolate.dart |
| index 8d284d23a10df287f882ab56add2f70ab35b862c..fe3dc52d9f59ed50332b8b9cadf44cd70a6b7a19 100644 |
| --- a/sdk/lib/isolate/isolate.dart |
| +++ b/sdk/lib/isolate/isolate.dart |
| @@ -127,6 +127,34 @@ class Isolate { |
| external static Isolate get current; |
| /** |
| + * Returns the package root of the current isolate, if any. |
| + * |
| + * If the isolate is using a [packageConfig] or the isolate has not been |
| + * setup for package resolution, this getter returns `null`, otherwise it |
| + * returns the package root - a directory that package URIs are resolved |
| + * against. |
| + */ |
|
rmacnak
2016/01/13 01:39:00
Note how this value can differ from Platform.packa
|
| + external static Future<Uri> get packageRoot; |
| + |
| + /** |
| + * Returns the package root of the current isolate, if any. |
|
rmacnak
2016/01/13 01:39:00
package root => location of the package config
|
| + * |
| + * If the isolate is using a [packageRoot] or the isolate has not been |
| + * setup for package resolution, this getter returns `null`, otherwise it |
| + * returns the package config URI. |
| + */ |
|
rmacnak
2016/01/13 01:39:00
Note how this value can differ from Platform.packa
|
| + external static Future<Uri> get packageConfig; |
| + |
| + /** |
| + * Maps a package: URI to a non-package Uri. |
| + * |
| + * If there is no valid mapping from the package: URI in the current |
| + * isolate, then this call returns `null`. Non-package: URI are |
|
rmacnak
2016/01/13 01:39:00
Non-package: URIs
Ivan Posva
2016/01/13 02:13:15
Done.
|
| + * returned unmodified. |
| + */ |
| + external static Future<Uri> resolvePackageUri(Uri packageUri); |
| + |
| + /** |
| * Creates and spawns an isolate that shares the same code as the current |
| * isolate. |
| * |
| @@ -244,7 +272,9 @@ class Isolate { |
| bool errorsAreFatal, |
| bool checked, |
| Map<String, String> environment, |
| - Uri packageRoot}); |
| + Uri packageRoot, |
| + Uri packageConfig, |
| + bool automaticPackageResolution: false}); |
| /** |
| * Requests the isolate to pause. |