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

Unified Diff: src/snapshot/serializer.h

Issue 2052433003: [snapshot] make snapshot sink a non-dynamic member of the serializer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@noref
Patch Set: rebase Created 4 years, 6 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 | « src/snapshot/partial-serializer.cc ('k') | src/snapshot/serializer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/serializer.h
diff --git a/src/snapshot/serializer.h b/src/snapshot/serializer.h
index 68b6f0291670c2152f41cb99d8da4a680ebc38e4..46dd4a1401406af288f64f9a5c4da89351f1a3f3 100644
--- a/src/snapshot/serializer.h
+++ b/src/snapshot/serializer.h
@@ -120,7 +120,7 @@ class CodeAddressMap : public CodeEventLogger {
// There can be only one serializer per V8 process.
class Serializer : public SerializerDeserializer {
public:
- Serializer(Isolate* isolate, SnapshotByteSink* sink);
+ explicit Serializer(Isolate* isolate);
~Serializer() override;
void EncodeReservations(List<SerializedData::Reservation>* out) const;
@@ -177,8 +177,8 @@ class Serializer : public SerializerDeserializer {
inline void FlushSkip(int skip) {
if (skip != 0) {
- sink_->Put(kSkip, "SkipFromSerializeObject");
- sink_->PutInt(skip, "SkipDistanceFromSerializeObject");
+ sink_.Put(kSkip, "SkipFromSerializeObject");
+ sink_.PutInt(skip, "SkipDistanceFromSerializeObject");
}
}
@@ -208,7 +208,7 @@ class Serializer : public SerializerDeserializer {
return max_chunk_size_[space];
}
- SnapshotByteSink* sink() const { return sink_; }
+ const SnapshotByteSink* sink() const { return &sink_; }
void QueueDeferredObject(HeapObject* obj) {
DCHECK(reference_map_.Lookup(obj).is_back_reference());
@@ -219,7 +219,7 @@ class Serializer : public SerializerDeserializer {
Isolate* isolate_;
- SnapshotByteSink* sink_;
+ SnapshotByteSink sink_;
ExternalReferenceEncoder external_reference_encoder_;
SerializerReferenceMap reference_map_;
« no previous file with comments | « src/snapshot/partial-serializer.cc ('k') | src/snapshot/serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698