Index: runtime/bin/platform_patch.dart |
diff --git a/runtime/bin/platform_patch.dart b/runtime/bin/platform_patch.dart |
index 50439c5002803d8eb191f1b1cdb7617b721b2ac6..577bbb6dffcd67677533290438c93ccc362cf8a5 100644 |
--- a/runtime/bin/platform_patch.dart |
+++ b/runtime/bin/platform_patch.dart |
@@ -26,4 +26,19 @@ patch class _Platform { |
=> VMLibraryHooks.packageRootString; |
/* patch */ static String _packageConfig() |
=> VMLibraryHooks.packageConfigString; |
+ |
+ // This script singleton is written to by the embedder if applicable. |
+ /* patch */ static void set _nativeScript(String path) { |
+ if (path.startsWith('http:') || |
+ path.startsWith('https:') || |
+ path.startsWith('package:') || |
+ path.startsWith('dart:') || |
+ path.startsWith('data:') || |
+ path.startsWith('file:')) { |
+ script = Uri.parse(path); |
+ } else { |
+ script = Uri.base.resolveUri(new Uri.file(path)); |
+ } |
+ VMLibraryHooks.platformScript = script; |
+ } |
} |