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

Unified Diff: runtime/bin/dartutils.cc

Issue 270503007: Eliminate unused url mapping parameter in dartutils (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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
Index: runtime/bin/dartutils.cc
===================================================================
--- runtime/bin/dartutils.cc (revision 35851)
+++ runtime/bin/dartutils.cc (working copy)
@@ -174,8 +174,7 @@
}
-Dart_Handle DartUtils::CanonicalizeURL(CommandLineOptions* url_mapping,
- Dart_Handle library,
+Dart_Handle DartUtils::CanonicalizeURL(Dart_Handle library,
const char* url_str) {
// Get the url of the including library.
Dart_Handle library_url = Dart_LibraryUrl(library);
@@ -190,13 +189,6 @@
if (Dart_IsError(result)) {
return Dart_NewApiError("accessing library url characters failed");
}
- if (url_mapping != NULL) {
- const char* mapped_library_url_str = MapLibraryUrl(url_mapping,
- library_url_str);
- if (mapped_library_url_str != NULL) {
- library_url_str = mapped_library_url_str;
- }
- }
// Calculate the canonical path.
const char* canon_url_str = GetCanonicalPath(library_url_str, url_str);
Dart_Handle canon_url = NewString(canon_url_str);
@@ -568,11 +560,7 @@
}
const char* final_path = NULL;
Dart_StringToCString(file_path, &final_path);
- result = DartUtils::LoadSource(NULL,
- library,
- url,
- tag,
- final_path);
+ result = DartUtils::LoadSource(library, url, tag, final_path);
return result;
}
}
@@ -670,21 +658,11 @@
}
-Dart_Handle DartUtils::LoadSource(CommandLineOptions* url_mapping,
- Dart_Handle library,
+Dart_Handle DartUtils::LoadSource(Dart_Handle library,
Dart_Handle url,
Dart_LibraryTag tag,
const char* url_string) {
bool is_http_scheme_url = DartUtils::IsHttpSchemeURL(url_string);
- if (url_mapping != NULL && IsDartSchemeURL(url_string)) {
- const char* mapped_url_string = MapLibraryUrl(url_mapping, url_string);
- if (mapped_url_string == NULL) {
- return NewError("Do not know how to load %s", url_string);
- }
- // We have a URL mapping specified, just read the file that the
- // URL mapping specifies and load it.
- url_string = mapped_url_string;
- }
Dart_Handle source;
if (is_http_scheme_url) {
// Read the file over http.
« no previous file with comments | « runtime/bin/dartutils.h ('k') | runtime/bin/gen_snapshot.cc » ('j') | runtime/vm/unit_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698