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

Unified Diff: runtime/bin/dartutils.cc

Issue 180783008: Change handling of dart-ext: URIs for native extensions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Make _DART_EXT top-level. Created 6 years, 10 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
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index 8bc5aeab8e55a25a32adbbcba6b5af6930de52cf..10c7227ca0b81c1c0e6f7ccfabd6a626b3fb9d02 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -475,7 +475,6 @@ Dart_Handle DartUtils::LibraryTagHandler(Dart_LibraryTag tag,
bool is_dart_scheme_url = DartUtils::IsDartSchemeURL(url_string);
bool is_io_library = DartUtils::IsDartIOLibURL(library_url_string);
- bool is_dart_extension_url = DartUtils::IsDartExtensionSchemeURL(url_string);
// Handle URI canonicalization requests.
if (tag == Dart_kCanonicalizeUrl) {
@@ -528,18 +527,19 @@ Dart_Handle DartUtils::LibraryTagHandler(Dart_LibraryTag tag,
if (Dart_IsError(file_path)) {
return file_path;
}
- Dart_StringToCString(file_path, &url_string);
- if (is_dart_extension_url) {
+ const char* final_path = NULL;
+ Dart_StringToCString(file_path, &final_path);
+ if (DartUtils::IsDartExtensionSchemeURL(url_string)) {
if (tag != Dart_kImportTag) {
return NewError("Dart extensions must use import: '%s'", url_string);
}
- return Extensions::LoadExtension(url_string, library);
+ return Extensions::LoadExtension(final_path, library);
}
result = DartUtils::LoadSource(NULL,
library,
url,
tag,
- url_string);
+ final_path);
return result;
}

Powered by Google App Engine
This is Rietveld 408576698