Skip to content

Commit

Permalink
src: split BlobSerializer/BlobDeserializer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
joyeecheung committed Apr 25, 2023
1 parent ab3a54f commit 2e44a14
Show file tree
Hide file tree
Showing 2 changed files with 169 additions and 100 deletions.
1 change: 1 addition & 0 deletions src/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ struct SnapshotData {
bool Check() const;
static bool FromFile(SnapshotData* out, FILE* in);
static bool FromBlob(SnapshotData* out, const std::vector<char>& in);
static bool FromBlob(SnapshotData* out, std::string_view in);
static const SnapshotData* FromEmbedderWrapper(
const EmbedderSnapshotData* data);
EmbedderSnapshotData::Pointer AsEmbedderWrapper() const;
Expand Down
Loading

0 comments on commit 2e44a14

Please sign in to comment.