Index: runtime/bin/platform_patch.dart |
diff --git a/runtime/bin/platform_patch.dart b/runtime/bin/platform_patch.dart |
index c917b54f77c2d65f54543f218e068226859e4e9e..97afd96225023d75a169af9f79ee1597497dc0f3 100644 |
--- a/runtime/bin/platform_patch.dart |
+++ b/runtime/bin/platform_patch.dart |
@@ -15,6 +15,21 @@ patch class _Platform { |
/* patch */ static _environment() native "Platform_Environment"; |
/* patch */ static List<String> _executableArguments() |
native "Platform_ExecutableArguments"; |
- /* patch */ static String _packageRoot() native "Platform_PackageRoot"; |
/* patch */ static String _version() native "Platform_GetVersion"; |
+ |
+ /* patch */ static Future<Uri> get packageRoot { |
+ var hook = VMLibraryHooks.getPackageRoot; |
siva
2015/09/14 18:12:07
indentation seems to be off.
|
+ if (hook == null) { |
+ throw new UnimplementedError("Platform.packageRoot"); |
+ } |
+ return hook(); |
+ } |
+ |
+ /* patch */ static Future<Map<String, Uri>> get packageMap { |
+ var hook = VMLibraryHooks.getPackageMap; |
+ if (hook == null) { |
+ throw new UnimplementedError("Platform.packageMap"); |
+ } |
+ return hook(); |
+ } |
} |