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

Unified Diff: runtime/bin/gen_snapshot.cc

Issue 2087723002: Fix canonicalization of relative paths, Dart_DefaultCanonicalizeUrl expects the base)url to end wit… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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/dartutils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/gen_snapshot.cc
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
index 0ed4c0af46ff25c8dce224dcf95e65f042a06fac..a8d04e329e9327cade023b7a46937d00fba70c6f 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -455,7 +455,7 @@ static Dart_Handle LoadSnapshotCreationScript(const char* script_name) {
// First resolve the specified script uri with respect to the original
// working directory.
Dart_Handle resolved_uri = Dart_DefaultCanonicalizeUrl(
- Dart_NewStringFromCString(DartUtils::original_working_directory),
+ DartUtils::GetCanonicalizableWorkingDirectory(),
Dart_NewStringFromCString(script_name));
if (Dart_IsError(resolved_uri)) {
return resolved_uri;
@@ -500,7 +500,7 @@ static Dart_Handle CreateSnapshotLibraryTagHandler(Dart_LibraryTag tag,
library_url_string);
if (mapped_library_url_string != NULL) {
library_url = Dart_DefaultCanonicalizeUrl(
- Dart_NewStringFromCString(DartUtils::original_working_directory),
+ DartUtils::GetCanonicalizableWorkingDirectory(),
Dart_NewStringFromCString(mapped_library_url_string));
library_url_string = DartUtils::GetStringValue(library_url);
}
@@ -547,7 +547,7 @@ static Dart_Handle CreateSnapshotLibraryTagHandler(Dart_LibraryTag tag,
if (mapped_url_string != NULL) {
// Mapped urls are relative to working directory.
resolved_url = Dart_DefaultCanonicalizeUrl(
- Dart_NewStringFromCString(DartUtils::original_working_directory),
+ DartUtils::GetCanonicalizableWorkingDirectory(),
Dart_NewStringFromCString(mapped_url_string));
if (Dart_IsError(resolved_url)) {
return resolved_url;
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698