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

Unified Diff: runtime/vm/object.cc

Issue 10444091: Avoid reading RawObject::class_ directly in the runtime. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 5420ed216d51fde98ca437a56c2ecc7a612c32e8..3eb9c37e48a7012caddc60ae57de4c8087152277 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -278,7 +278,9 @@ void Object::InitOnce() {
Class fake;
// Initialization from Class::New<Class>.
- cls = class_class_;
+ // Directly set raw_ to break a circular dependency: SetRaw will attempt
+ // to lookup class class in the class table where it is not registered yet.
+ cls.raw_ = class_class_;
cls.set_handle_vtable(fake.vtable());
cls.set_instance_size(Class::InstanceSize());
cls.set_next_field_offset(Class::InstanceSize());
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/raw_object.h » ('j') | runtime/vm/raw_object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698