Index: runtime/vm/snapshot.cc |
=================================================================== |
--- runtime/vm/snapshot.cc (revision 33311) |
+++ runtime/vm/snapshot.cc (working copy) |
@@ -380,6 +380,11 @@ |
} |
} |
+ // Validate the class table. |
+#if defined(DEBUG) |
+ isolate->ValidateClassTable(); |
+#endif |
+ |
// Setup native resolver for bootstrap impl. |
Bootstrap::SetupNativeResolver(); |
} |
@@ -472,8 +477,8 @@ |
Instance fake; |
obj->ptr()->handle_vtable_ = fake.vtable(); |
cls_ = obj; |
- cls_.set_id(kIllegalCid); |
- isolate()->RegisterClass(cls_); |
+ cls_.set_id(class_id); |
+ isolate()->RegisterClassAt(class_id, cls_); |
return cls_.raw(); |
} |
@@ -1121,6 +1126,12 @@ |
ASSERT(object_store != NULL); |
ASSERT(ClassFinalizer::AllClassesFinalized()); |
+ // Ensure the class table is valid. |
+#if defined(DEBUG) |
+ isolate->ValidateClassTable(); |
+#endif |
+ |
+ |
// Setup for long jump in case there is an exception while writing |
// the snapshot. |
LongJumpScope jump; |