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

Unified Diff: vm/snapshot.cc

Issue 9580036: - Always write a Null Object for Code objects (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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
« no previous file with comments | « vm/raw_object_snapshot.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/snapshot.cc
===================================================================
--- vm/snapshot.cc (revision 4911)
+++ vm/snapshot.cc (working copy)
@@ -494,6 +494,13 @@
return;
}
+ // Check if it is a code object in that case just write a Null object
+ // as we do not want code objects in the snapshot.
+ if (rawobj->ptr()->class_ == Object::code_class()) {
+ WriteIndexedObject(Object::kNullObject);
+ return;
+ }
+
// Check if classes are not being serialized and it is preinitialized type.
if (kind_ != Snapshot::kFull) {
RawType* raw_type = reinterpret_cast<RawType*>(rawobj);
« no previous file with comments | « vm/raw_object_snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698