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

Unified Diff: runtime/vm/parser.cc

Issue 267353005: - Change when the library being loaded is registered. Now (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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
« runtime/bin/builtin_nolib.cc ('K') | « runtime/bin/dartutils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 35776)
+++ runtime/vm/parser.cc (working copy)
@@ -5064,16 +5064,13 @@
// Lookup the library URL.
Library& library = Library::Handle(Library::LookupLibrary(canon_url));
if (library.IsNull()) {
+ // Create an empty library to mark that we have initiated loading of this
+ // library.
+ library = Library::New(canon_url);
+ library.Register();
// Call the library tag handler to load the library.
// TODO(hausner): do not load eagerly if import is deferred.
CallLibraryTagHandler(Dart_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();
- }
}
Namespace& ns =
« runtime/bin/builtin_nolib.cc ('K') | « runtime/bin/dartutils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698