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

Unified Diff: vm/object.cc

Issue 8520030: Set the loaded_ flag in RawLibrary when it is completely loaded. This (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 9 years, 1 month 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
Index: vm/object.cc
===================================================================
--- vm/object.cc (revision 1553)
+++ vm/object.cc (working copy)
@@ -3671,12 +3671,19 @@
void Library::SetName(const String& name) const {
// Only set name once.
- ASSERT(raw_ptr()->name_ == raw_ptr()->url_);
+ ASSERT(!loaded());
ASSERT(name.IsSymbol());
StorePointer(&raw_ptr()->name_, name.raw());
}
+void Library::SetLoaded() const {
+ // Should not be already loaded.
+ ASSERT(!loaded());
+ raw_ptr()->loaded_ = true;
+}
+
+
void Library::GrowDictionary(const Array& dict, intptr_t dict_size) const {
// TODO(iposva): Avoid exponential growth.
intptr_t new_dict_size = dict_size * 2;
« vm/dart_api_impl.cc ('K') | « vm/object.h ('k') | vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698