Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 4d210172b8b1bc310b738fa326e338c61da3a46e..1852b549bf1802c351297f3363ddac401386e66c 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -1952,7 +1952,9 @@ void JSFunctionResultCache::MakeZeroSize() { |
void JSFunctionResultCache::Clear() { |
int cache_size = Smi::cast(get(kCacheSizeIndex))->value(); |
Object** entries_start = RawField(this, OffsetOfElementAt(kEntriesIndex)); |
- MemsetPointer(entries_start, Heap::the_hole_value(), cache_size); |
+ MemsetPointer(entries_start, |
+ Heap::the_hole_value(), |
+ cache_size - kEntriesIndex); |
MakeZeroSize(); |
} |