Skip to content

Commit 4431df7

Browse files
joyeecheungtargos
authored andcommitted
src: split BlobSerializer/BlobDeserializer
This patch splits BlobSerializer and BlobDeserializer out of SnapshotSerializer and SnapshotDeserializer. The child classes can implement serialization methods for custom types on top of BlobSerializer/BlobDeserializer for conversions between native types and binary blobs. This allows us to reuse the classes for other cases (e.g. SEA blobs). PR-URL: #47458 Reviewed-By: Darshan Sen <raisinten@gmail.com>
1 parent f8581e7 commit 4431df7

File tree

2 files changed

+169
-100
lines changed

2 files changed

+169
-100
lines changed

src/env.h

+1
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ struct SnapshotData {
534534
bool Check() const;
535535
static bool FromFile(SnapshotData* out, FILE* in);
536536
static bool FromBlob(SnapshotData* out, const std::vector<char>& in);
537+
static bool FromBlob(SnapshotData* out, std::string_view in);
537538
static const SnapshotData* FromEmbedderWrapper(
538539
const EmbedderSnapshotData* data);
539540
EmbedderSnapshotData::Pointer AsEmbedderWrapper() const;

0 commit comments

Comments
 (0)