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

Unified Diff: src/snapshot/serializer.h

Issue 1811913002: [serializer] ensure that immortal immovable roots are correctly deserialized. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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: src/snapshot/serializer.h
diff --git a/src/snapshot/serializer.h b/src/snapshot/serializer.h
index ca00e689f544920bec590dc6da39852e840ea563..eccbaabf5b718cc29aeb0c714d46332811bbab82 100644
--- a/src/snapshot/serializer.h
+++ b/src/snapshot/serializer.h
@@ -155,9 +155,13 @@ class Serializer : public SerializerDeserializer {
virtual void SerializeObject(HeapObject* o, HowToCode how_to_code,
WhereToPoint where_to_point, int skip) = 0;
+ void VisitPointers(Object** start, Object** end) override;
+
void PutRoot(int index, HeapObject* object, HowToCode how, WhereToPoint where,
int skip);
+ void PutSmi(Smi* smi);
+
void PutBackReference(HeapObject* object, BackReference reference);
// Emit alignment prefix if necessary, return required padding space in bytes.
@@ -183,13 +187,11 @@ class Serializer : public SerializerDeserializer {
return external_reference_encoder_.Encode(addr);
}
+ bool HasNotExceededFirstPageOfEachSpace();
+
// GetInt reads 4 bytes at once, requiring padding at the end.
void Pad();
- // Some roots should not be serialized, because their actual value depends on
- // absolute addresses and they are reset after deserialization, anyway.
- bool ShouldBeSkipped(Object** current);
-
// We may not need the code address map for logging for every instance
// of the serializer. Initialize it on demand.
void InitializeCodeAddressMap();
@@ -227,8 +229,6 @@ class Serializer : public SerializerDeserializer {
friend class SnapshotData;
private:
- void VisitPointers(Object** start, Object** end) override;
-
CodeAddressMap* code_address_map_;
// Objects from the same space are put into chunks for bulk-allocation
// when deserializing. We have to make sure that each chunk fits into a

Powered by Google App Engine
This is Rietveld 408576698