Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(512)

Unified Diff: runtime/bin/vmservice/loader.dart

Issue 2073173002: Use the new loader mechanism to resolve URIs and load script files in gen_snapshot. This should all… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address issues that were found while testing with the flutter engine. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/loader.cc ('k') | runtime/bin/vmservice_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/vmservice/loader.dart
diff --git a/runtime/bin/vmservice/loader.dart b/runtime/bin/vmservice/loader.dart
index 82fbe5e0e11ca845625b9da5b8b49515a6d473c7..cb6792ba5bedeefa69de0c829bfd60919b3f3088 100644
--- a/runtime/bin/vmservice/loader.dart
+++ b/runtime/bin/vmservice/loader.dart
@@ -480,7 +480,7 @@ _handleResourceRequest(IsolateLoaderState loaderState,
Uri uri,
Uri resolvedUri,
String libraryUrl) {
- if (resolvedUri.scheme == 'file') {
+ if (resolvedUri.scheme == '' || resolvedUri.scheme == 'file') {
_loadFile(sp, tag, uri, resolvedUri, libraryUrl);
} else if ((resolvedUri.scheme == 'http') ||
(resolvedUri.scheme == 'https')) {
@@ -805,7 +805,7 @@ _handlePackagesRequest(SendPort sp,
Uri resource) async {
try {
if (tag == -1) {
- if (resource.scheme == 'file') {
+ if (resource.scheme == '' || resource.scheme == 'file') {
_findPackagesFile(sp, traceLoading, resource);
} else if ((resource.scheme == 'http') || (resource.scheme == 'https')) {
// Try to load the .packages file next to the resource.
@@ -825,7 +825,7 @@ _handlePackagesRequest(SendPort sp,
if (traceLoading) {
_log("Handling load of packages map: '$resource'.");
}
- if (resource.scheme == 'file') {
+ if (resource.scheme == '' || resource.scheme == 'file') {
var exists = await new File.fromUri(resource).exists();
if (exists) {
_loadPackagesFile(sp, traceLoading, resource);
« no previous file with comments | « runtime/bin/loader.cc ('k') | runtime/bin/vmservice_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698