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

Unified Diff: bin/main.cc

Issue 9417012: - Add dart:json, dart:uri and dart:utf8 to the known and builtin libraries. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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
« no previous file with comments | « bin/json_sources.gypi ('k') | bin/uri_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/main.cc
===================================================================
--- bin/main.cc (revision 4317)
+++ bin/main.cc (working copy)
@@ -267,9 +267,16 @@
return DartUtils::CanonicalizeURL(NULL, library, url_string);
}
if (is_dart_scheme_url) {
- // Handle imports of dart:io.
- if (DartUtils::IsDartIOLibURL(url_string) && (tag == kImportTag)) {
+ ASSERT(tag == kImportTag);
+ // Handle imports of other built-in libraries present in the SDK.
+ if (DartUtils::IsDartIOLibURL(url_string)) {
return Builtin::LoadLibrary(Builtin::kIOLibrary);
+ } else if (DartUtils::IsDartJsonLibURL(url_string)) {
+ return Builtin::LoadLibrary(Builtin::kJsonLibrary);
+ } else if (DartUtils::IsDartUriLibURL(url_string)) {
+ return Builtin::LoadLibrary(Builtin::kUriLibrary);
+ } else if (DartUtils::IsDartUtf8LibURL(url_string)) {
+ return Builtin::LoadLibrary(Builtin::kUtf8Library);
} else {
return Dart_Error("Do not know how to load '%s'", url_string);
}
« no previous file with comments | « bin/json_sources.gypi ('k') | bin/uri_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698