Commit 5e7c8ea6 authored by Dominik Inführ's avatar Dominik Inführ Committed by V8 LUCI CQ

[heap] Do not fill old-to-shared in shared isolate

No need to insert into the old-to-shared remembered set for the
shared isolate itself. Check whether the host object is in the shared
isolate before inserting into the remembered set.

Bug: v8:13208, v8:11708
Change-Id: Ic1442653f6c27c51444544cd7b31356594b712e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3840298
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82574}
parent 4db42a36
......@@ -103,7 +103,10 @@ int WriteBarrier::MarkingFromCode(Address raw_host, Address raw_slot) {
int WriteBarrier::SharedFromCode(Address raw_host, Address raw_slot) {
HeapObject host = HeapObject::cast(Object(raw_host));
Heap::SharedHeapBarrierSlow(host, raw_slot);
if (!host.InSharedWritableHeap()) {
Heap::SharedHeapBarrierSlow(host, raw_slot);
}
// Called by WriteBarrierCodeStubAssembler, which doesn't accept void type
return 0;
......
......@@ -7306,6 +7306,7 @@ void Heap::GenerationalBarrierSlow(HeapObject object, Address slot,
void Heap::SharedHeapBarrierSlow(HeapObject object, Address slot) {
MemoryChunk* chunk = MemoryChunk::FromHeapObject(object);
DCHECK(!chunk->InSharedHeap());
RememberedSet<OLD_TO_SHARED>::Insert<AccessMode::ATOMIC>(chunk, slot);
}
......
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