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

Unified Diff: vm/raw_object_snapshot.cc

Issue 10861023: Currently we use a generated number as the class id for object class, this change tries to pin it t… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « vm/object.cc ('k') | vm/snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/raw_object_snapshot.cc
===================================================================
--- vm/raw_object_snapshot.cc (revision 11008)
+++ vm/raw_object_snapshot.cc (working copy)
@@ -41,7 +41,16 @@
if (kind == Snapshot::kFull) {
cls = reader->NewClass(class_id, is_signature_class);
} else {
- cls = Class::GetClass(class_id, is_signature_class);
+ if (class_id < kNumPredefinedCids) {
+ ASSERT((class_id >= kInstanceCid) && (class_id <= kWeakPropertyCid));
+ cls = reader->isolate()->class_table()->At(class_id);
+ } else {
+ if (is_signature_class) {
+ cls = Class::New<Closure>(kIllegalCid);
+ } else {
+ cls = Class::New<Instance>(kIllegalCid);
+ }
+ }
}
reader->AddBackRef(object_id, &cls, kIsDeserialized);
« no previous file with comments | « vm/object.cc ('k') | vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698