Commit 8598d770 authored by Dominik Inführ's avatar Dominik Inführ Committed by V8 LUCI CQ

[heap] Update invalidated object size in OLD_TO_OLD also during GC

The string forwarding table invokes MakeThin even during a GC.
However during a GC we didn't update the invalidated object size for
OLD_TO_OLD because incremental marking was already stopped at that
point.

Change-Id: Ia2f0d2277b59b299c3c8bf5c3febbde634e3ec06
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3910028Reviewed-by: 's avatarPatrick Thier <pthier@chromium.org>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83368}
parent 6f3aae99
...@@ -3935,7 +3935,7 @@ void Heap::NotifyObjectSizeChange(HeapObject object, int old_size, int new_size, ...@@ -3935,7 +3935,7 @@ void Heap::NotifyObjectSizeChange(HeapObject object, int old_size, int new_size,
void Heap::UpdateInvalidatedObjectSize(HeapObject object, int new_size) { void Heap::UpdateInvalidatedObjectSize(HeapObject object, int new_size) {
if (!MayContainRecordedSlots(object)) return; if (!MayContainRecordedSlots(object)) return;
if (incremental_marking()->IsCompacting()) { if (incremental_marking()->IsCompacting() || gc_state() == MARK_COMPACT) {
MemoryChunk::FromHeapObject(object) MemoryChunk::FromHeapObject(object)
->UpdateInvalidatedObjectSize<OLD_TO_OLD>(object, new_size); ->UpdateInvalidatedObjectSize<OLD_TO_OLD>(object, new_size);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment