| Index: src/snapshot/serializer-common.h
|
| diff --git a/src/snapshot/serializer-common.h b/src/snapshot/serializer-common.h
|
| index 74b02180739e4138f086546d04f8df7515bff114..1ca0a5f732a332ddc07c1f5695b7c17dc82f0a44 100644
|
| --- a/src/snapshot/serializer-common.h
|
| +++ b/src/snapshot/serializer-common.h
|
| @@ -253,11 +253,15 @@ class SerializedData {
|
| }
|
|
|
| protected:
|
| - void SetHeaderValue(int offset, uint32_t value) {
|
| - uint32_t* address = reinterpret_cast<uint32_t*>(data_ + offset);
|
| + static void SetHeaderValueInBuffer(byte* buffer, int offset, uint32_t value) {
|
| + uint32_t* address = reinterpret_cast<uint32_t*>(buffer + offset);
|
| memcpy(reinterpret_cast<uint32_t*>(address), &value, sizeof(value));
|
| }
|
|
|
| + void SetHeaderValue(int offset, uint32_t value) {
|
| + SetHeaderValueInBuffer(data_, offset, value);
|
| + }
|
| +
|
| uint32_t GetHeaderValue(int offset) const {
|
| uint32_t value;
|
| memcpy(&value, reinterpret_cast<int*>(data_ + offset), sizeof(value));
|
|
|