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

Unified Diff: bin/gen_snapshot.cc

Issue 9655015: - The dart:io library uses Uri from dart:uri. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 9 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 | bin/io.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/gen_snapshot.cc
===================================================================
--- bin/gen_snapshot.cc (revision 5205)
+++ bin/gen_snapshot.cc (working copy)
@@ -182,8 +182,17 @@
if (tag == kCanonicalizeUrl) {
return url;
}
- // TODO(iposva): Make sure only the known libraries are being added.
- return Dart_True();
+ 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::IsDartUtfLibURL(url_string)) {
+ return Builtin::LoadLibrary(Builtin::kUtfLibrary);
+ }
siva 2012/03/09 18:02:39 The fall through case here is going to produce an
}
return Dart_Error("unexpected tag encountered %d", tag);
}
« no previous file with comments | « no previous file | bin/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698