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

Unified Diff: runtime/bin/dartutils.cc

Issue 12036089: Fix issue 8094: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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 | « no previous file | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dartutils.cc
===================================================================
--- runtime/bin/dartutils.cc (revision 17587)
+++ runtime/bin/dartutils.cc (working copy)
@@ -306,23 +306,27 @@
return ResolveUri(library_url, url, builtin_lib);
}
if (is_dart_scheme_url) {
- ASSERT(tag == kImportTag);
- // Handle imports of other built-in libraries present in the SDK.
- Builtin::BuiltinLibraryId id;
- if (DartUtils::IsDartCryptoLibURL(url_string)) {
- id = Builtin::kCryptoLibrary;
- } else if (DartUtils::IsDartIOLibURL(url_string)) {
- id = Builtin::kIOLibrary;
- } else if (DartUtils::IsDartJsonLibURL(url_string)) {
- id = Builtin::kJsonLibrary;
- } else if (DartUtils::IsDartUriLibURL(url_string)) {
- id = Builtin::kUriLibrary;
- } else if (DartUtils::IsDartUtfLibURL(url_string)) {
- id = Builtin::kUtfLibrary;
+ if (tag == kImportTag) {
+ // Handle imports of other built-in libraries present in the SDK.
+ Builtin::BuiltinLibraryId id;
+ if (DartUtils::IsDartCryptoLibURL(url_string)) {
+ id = Builtin::kCryptoLibrary;
+ } else if (DartUtils::IsDartIOLibURL(url_string)) {
+ id = Builtin::kIOLibrary;
+ } else if (DartUtils::IsDartJsonLibURL(url_string)) {
+ id = Builtin::kJsonLibrary;
+ } else if (DartUtils::IsDartUriLibURL(url_string)) {
+ id = Builtin::kUriLibrary;
+ } else if (DartUtils::IsDartUtfLibURL(url_string)) {
+ id = Builtin::kUtfLibrary;
+ } else {
+ return Dart_Error("Do not know how to load '%s'", url_string);
+ }
+ return Builtin::LoadAndCheckLibrary(id);
} else {
- return Dart_Error("Do not know how to load '%s'", url_string);
+ ASSERT(tag == kSourceTag);
+ return Dart_Error("Unable to load source '%s' ", url_string);
}
- return Builtin::LoadAndCheckLibrary(id);
} else {
// Get the file path out of the url.
Dart_Handle builtin_lib =
« no previous file with comments | « no previous file | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698