diff options
Diffstat (limited to 'deps/v8/src/heap/heap-write-barrier.cc')
-rw-r--r-- | deps/v8/src/heap/heap-write-barrier.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/deps/v8/src/heap/heap-write-barrier.cc b/deps/v8/src/heap/heap-write-barrier.cc index 63949de243..0030615bab 100644 --- a/deps/v8/src/heap/heap-write-barrier.cc +++ b/deps/v8/src/heap/heap-write-barrier.cc @@ -68,7 +68,16 @@ void WriteBarrier::MarkingSlow(Heap* heap, DescriptorArray descriptor_array, int WriteBarrier::MarkingFromCode(Address raw_host, Address raw_slot) { HeapObject host = HeapObject::cast(Object(raw_host)); MaybeObjectSlot slot(raw_slot); - WriteBarrier::Marking(host, slot, *slot); + Address value = (*slot).ptr(); +#ifdef V8_MAP_PACKING + if (slot.address() == host.address()) { + // Clear metadata bits and fix object tag. + value = (value & ~Internals::kMapWordMetadataMask & + ~Internals::kMapWordXorMask) | + (uint64_t)kHeapObjectTag; + } +#endif + WriteBarrier::Marking(host, slot, MaybeObject(value)); // Called by RecordWriteCodeStubAssembler, which doesnt accept void type return 0; } |