Chromium Code Reviews| Index: src/snapshot/code-serializer.cc |
| diff --git a/src/snapshot/code-serializer.cc b/src/snapshot/code-serializer.cc |
| index 9712d79e19ed27c214112d4476bd9d256ddb3347..e0e0eb61609564d11bd2721ea17f093315cfb597 100644 |
| --- a/src/snapshot/code-serializer.cc |
| +++ b/src/snapshot/code-serializer.cc |
| @@ -415,5 +415,14 @@ const SerializedCodeData SerializedCodeData::FromCachedData( |
| return scd; |
| } |
| +void SerializedCodeData::InvalidateVersionForTest(byte* buffer, |
|
Yang
2016/10/13 06:52:59
I'm not really happy with introducing test APIs. C
Mircea Trofin
2016/10/13 16:09:10
The former is more complicated, because the field
|
| + size_t buffer_size) { |
| + DCHECK_GE(buffer_size, static_cast<size_t>(kVersionHashOffset + kInt32Size)); |
| + uint32_t expected_version_hash = Version::Hash(); |
| + uint32_t invalid_version_hash = expected_version_hash + 1; |
| + SerializedData::SetHeaderValueInBuffer(buffer, kVersionHashOffset, |
| + invalid_version_hash); |
| +} |
| + |
| } // namespace internal |
| } // namespace v8 |