Commit 9a36053b authored by Dominik Inführ's avatar Dominik Inführ Committed by V8 LUCI CQ

[heap] Use full write barrier when setting maps

In addition to the marking barrier we now also need the shared barrier
for properly tracking the old-to-shared remembered set. So invoke
the full write barrier for set_map and set_map_after_allocation.

Bug: v8:11708
Change-Id: Ic234e7fad3733ab1348298f5fcc2b76e44cf4b8d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793388Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82065}
parent 4f0ef8c3
......@@ -860,7 +860,7 @@ void HeapObject::set_map(Map value, MemoryOrder order, VerificationMode mode) {
#ifndef V8_DISABLE_WRITE_BARRIERS
if (!value.is_null()) {
if (emit_write_barrier == EmitWriteBarrier::kYes) {
WriteBarrier::Marking(*this, map_slot(), value);
CombinedWriteBarrier(*this, map_slot(), value, UPDATE_WRITE_BARRIER);
} else {
DCHECK_EQ(emit_write_barrier, EmitWriteBarrier::kNo);
SLOW_DCHECK(!WriteBarrier::IsRequired(*this, value));
......@@ -875,7 +875,7 @@ void HeapObject::set_map_after_allocation(Map value, WriteBarrierMode mode) {
#ifndef V8_DISABLE_WRITE_BARRIERS
if (mode != SKIP_WRITE_BARRIER) {
DCHECK(!value.is_null());
WriteBarrier::Marking(*this, map_slot(), value);
CombinedWriteBarrier(*this, map_slot(), value, mode);
} else {
SLOW_DCHECK(!WriteBarrier::IsRequired(*this, value));
}
......
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