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

Unified Diff: runtime/bin/gen_snapshot.cc

Issue 2011543002: Canonicalize uris in C++ instead of Dart for the standalone embedder. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixz release build Created 4 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
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/include/dart_api.h » ('j') | 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 3e182486d25c3cee6403f445a13b2503207bfc76..dfc2aa0817f9ee47346d4c23ee25a8e8f507c10a 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -443,31 +443,6 @@ static Dart_Handle FilePathFromUri(const char* script_uri) {
}
-static Dart_Handle ResolveUri(const char* library_uri, const char* uri) {
- bool failed = false;
- char* result_string = NULL;
-
- {
- UriResolverIsolateScope scope;
-
- // Run DartUtils::ResolveUri in context of uri resolver isolate.
- Dart_Handle result = DartUtils::ResolveUri(
- DartUtils::NewString(library_uri), DartUtils::NewString(uri));
- if (Dart_IsError(result)) {
- failed = true;
- result_string = strdup(Dart_GetError(result));
- } else {
- result_string = strdup(DartUtils::GetStringValue(result));
- }
- }
-
- Dart_Handle result = failed ? Dart_NewApiError(result_string) :
- DartUtils::NewString(result_string);
- free(result_string);
- return result;
-}
-
-
static Builtin::BuiltinLibraryId BuiltinId(const char* url) {
if (DartUtils::IsDartBuiltinLibURL(url)) {
return Builtin::kBuiltinLibrary;
@@ -513,7 +488,7 @@ static Dart_Handle CreateSnapshotLibraryTagHandler(Dart_LibraryTag tag,
if (libraryBuiltinId != Builtin::kInvalidLibrary) {
return url;
}
- return ResolveUri(library_url_string, url_string);
+ return Dart_DefaultCanonicalizeUrl(library, url);
}
Builtin::BuiltinLibraryId builtinId = BuiltinId(url_string);
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/include/dart_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698