Index: src/serialize.cc |
diff --git a/src/serialize.cc b/src/serialize.cc |
index a6a516a76d5ceb5896c47eb8bb4e76e282fd5659..e8aed5496f14dd0061760b3c20c60e2e32ebe19c 100644 |
--- a/src/serialize.cc |
+++ b/src/serialize.cc |
@@ -673,6 +673,14 @@ void Deserializer::ReadObject(int space_number, |
LOG(SnapshotPositionEvent(address, source_->position())); |
} |
ReadChunk(current, limit, space_number, address); |
+ |
+ if (space == Heap::map_space()) { |
+ ASSERT(size == Map::kSize); |
+ HeapObject* obj = HeapObject::FromAddress(address); |
+ Map* map = reinterpret_cast<Map*>(obj); |
+ map->set_scavenger(Heap::GetScavenger(map->instance_type(), |
+ map->instance_size())); |
+ } |
} |