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

Unified Diff: runtime/vm/snapshot.cc

Issue 187133004: When reading a full snapshot use the class id from the snapshot instead of generating a new one. Th… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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/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;

Powered by Google App Engine
This is Rietveld 408576698