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 <[email protected]>
  • Loading branch information
joyeecheung authored and targos committed May 2, 2023
1 parent f8581e7 commit 4431df7
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 4431df7

Please sign in to comment.