Index: src/snapshot-source-sink.h |
diff --git a/src/snapshot-source-sink.h b/src/snapshot-source-sink.h |
index 398276fe5fda31f0c81d46d34a4fd1f60982f42b..f0cf1bb18f5c3d1cd8728e800da5ae4898cb069a 100644 |
--- a/src/snapshot-source-sink.h |
+++ b/src/snapshot-source-sink.h |
@@ -19,8 +19,13 @@ namespace internal { |
*/ |
class SnapshotByteSource FINAL { |
public: |
- SnapshotByteSource(const byte* array, int length); |
- ~SnapshotByteSource(); |
+ SnapshotByteSource(const byte* data, int length) |
+ : data_(data), length_(length), position_(0) {} |
+ |
+ explicit SnapshotByteSource(Vector<const byte> payload) |
+ : data_(payload.start()), length_(payload.length()), position_(0) {} |
+ |
+ ~SnapshotByteSource() {} |
bool HasMore() { return position_ < length_; } |
@@ -83,8 +88,8 @@ class SnapshotByteSink { |
} |
void PutInt(uintptr_t integer, const char* description); |
- void PutRaw(byte* data, int number_of_bytes, const char* description); |
- void PutBlob(byte* data, int number_of_bytes, const char* description); |
+ void PutRaw(const byte* data, int number_of_bytes, const char* description); |
+ void PutBlob(Vector<const byte> blob, const char* description); |
int Position() { return data_.length(); } |
const List<byte>& data() const { return data_; } |