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

Unified Diff: runtime/vm/parser.cc

Issue 9254026: Split dart:builtin into dart:builtin and dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Cosmetic changes. Created 8 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 | « runtime/bin/stdio.dart ('k') | samples/actors/samples/sssp/sssp-util.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 676b0c04f06721da19e13782981a144fdb7be855..78377451912142f5036e953695494510bc69160c 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -3329,11 +3329,15 @@ void Parser::ParseLibraryImport() {
// Lookup the library URL.
Library& library = Library::Handle(Library::LookupLibrary(canon_url));
if (library.IsNull()) {
- // Create a new library object and call the library tag handler.
- library = Library::New(canon_url);
- library.Register();
Mads Ager (google) 2012/01/23 11:35:38 I changed the handling of this. Registering an emp
- // The tag handler expects the importing library as a parameter.
+ // Call the library tag handler to load the library.
CallLibraryTagHandler(kImportTag, import_pos, canon_url);
+ // If the library tag handler succeded without registering the
+ // library we create an empty library to import.
+ library = Library::LookupLibrary(canon_url);
+ if (library.IsNull()) {
+ library = Library::New(canon_url);
+ library.Register();
+ }
}
// Add the import to the library.
if (prefix.IsNull() || (prefix.Length() == 0)) {
« no previous file with comments | « runtime/bin/stdio.dart ('k') | samples/actors/samples/sssp/sssp-util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698