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

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: Address comment and add binaries. 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 0ae905a631b03adb1365902037997dcf26f8e0ce..024cf621c5208fd50eace94fd229ed7e7302aa99 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -3320,11 +3320,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();
- // 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