| Index: src/snapshot-source-sink.cc
|
| diff --git a/src/snapshot-source-sink.cc b/src/snapshot-source-sink.cc
|
| index 44f87060fc98f478926fe5a15f9130c1d56cdbca..29bad33aac0b4c813aa9899a3fdf7bb25f865fc0 100644
|
| --- a/src/snapshot-source-sink.cc
|
| +++ b/src/snapshot-source-sink.cc
|
| @@ -39,15 +39,17 @@ void SnapshotByteSource::CopyRaw(byte* to, int number_of_bytes) {
|
|
|
|
|
| void SnapshotByteSink::PutInt(uintptr_t integer, const char* description) {
|
| - DCHECK(integer < 1 << 22);
|
| + DCHECK(integer < 1 << 30);
|
| integer <<= 2;
|
| int bytes = 1;
|
| if (integer > 0xff) bytes = 2;
|
| if (integer > 0xffff) bytes = 3;
|
| - integer |= bytes;
|
| + if (integer > 0xffffff) bytes = 4;
|
| + integer |= (bytes - 1);
|
| Put(static_cast<int>(integer & 0xff), "IntPart1");
|
| if (bytes > 1) Put(static_cast<int>((integer >> 8) & 0xff), "IntPart2");
|
| if (bytes > 2) Put(static_cast<int>((integer >> 16) & 0xff), "IntPart3");
|
| + if (bytes > 3) Put(static_cast<int>((integer >> 24) & 0xff), "IntPart4");
|
| }
|
|
|
| void SnapshotByteSink::PutRaw(byte* data, int number_of_bytes,
|
|
|