Index: runtime/bin/dartutils.cc |
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc |
index b7f418b7a7cab7c68bbed5b6373039ae6fb55c26..8be3b29a3ce8bfea25422945f16c5ff7c86f0542 100644 |
--- a/runtime/bin/dartutils.cc |
+++ b/runtime/bin/dartutils.cc |
@@ -367,18 +367,6 @@ Dart_Handle DartUtils::LibraryFilePath(Dart_Handle library_uri) { |
} |
-Dart_Handle DartUtils::ResolveUri(Dart_Handle library_url, Dart_Handle url) { |
- const int kNumArgs = 2; |
- Dart_Handle dart_args[kNumArgs]; |
- dart_args[0] = library_url; |
- dart_args[1] = url; |
- return Dart_Invoke(DartUtils::BuiltinLib(), |
- NewString("_resolveUri"), |
- kNumArgs, |
- dart_args); |
-} |
- |
- |
static Dart_Handle LoadDataAsync_Invoke(Dart_Handle tag, |
Dart_Handle url, |
Dart_Handle library_url) { |
@@ -397,6 +385,9 @@ static Dart_Handle LoadDataAsync_Invoke(Dart_Handle tag, |
Dart_Handle DartUtils::LibraryTagHandler(Dart_LibraryTag tag, |
Dart_Handle library, |
Dart_Handle url) { |
+ if (tag == Dart_kCanonicalizeUrl) { |
+ return Dart_DefaultCanonicalizeUrl(library, url); |
+ } |
if (!Dart_IsLibrary(library)) { |
return Dart_NewApiError("not a library"); |
} |
@@ -420,10 +411,7 @@ Dart_Handle DartUtils::LibraryTagHandler(Dart_LibraryTag tag, |
// Handle canonicalization, 'import' and 'part' of 'dart:' libraries. |
if (is_dart_scheme_url || is_dart_library) { |
- if (tag == Dart_kCanonicalizeUrl) { |
- // These will be handled internally. |
- return url; |
- } else if (tag == Dart_kImportTag) { |
+ if (tag == Dart_kImportTag) { |
Builtin::BuiltinLibraryId id = Builtin::FindId(url_string); |
if (id == Builtin::kInvalidLibrary) { |
return NewError("The built-in library '%s' is not available" |
@@ -452,11 +440,6 @@ Dart_Handle DartUtils::LibraryTagHandler(Dart_LibraryTag tag, |
UNREACHABLE(); |
} |
- if (tag == Dart_kCanonicalizeUrl) { |
- // Resolve the url within the context of the library's URL. |
- return ResolveUri(library_url, url); |
- } |
- |
if (DartUtils::IsDartExtensionSchemeURL(url_string)) { |
// Load a native code shared library to use in a native extension |
if (tag != Dart_kImportTag) { |