diff options
Diffstat (limited to 'deps/v8/src/heap/marking-barrier.cc')
-rw-r--r-- | deps/v8/src/heap/marking-barrier.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/deps/v8/src/heap/marking-barrier.cc b/deps/v8/src/heap/marking-barrier.cc index 6a7571af79..fc82ff50f2 100644 --- a/deps/v8/src/heap/marking-barrier.cc +++ b/deps/v8/src/heap/marking-barrier.cc @@ -121,15 +121,16 @@ void MarkingBarrier::Write(DescriptorArray descriptor_array, void MarkingBarrier::RecordRelocSlot(Code host, RelocInfo* rinfo, HeapObject target) { DCHECK(IsCurrentMarkingBarrier()); + if (!MarkCompactCollector::ShouldRecordRelocSlot(host, rinfo, target)) return; + MarkCompactCollector::RecordRelocSlotInfo info = - MarkCompactCollector::PrepareRecordRelocSlot(host, rinfo, target); - if (info.should_record) { - auto& typed_slots = typed_slots_map_[info.memory_chunk]; - if (!typed_slots) { - typed_slots.reset(new TypedSlots()); - } - typed_slots->Insert(info.slot_type, info.offset); + MarkCompactCollector::ProcessRelocInfo(host, rinfo, target); + + auto& typed_slots = typed_slots_map_[info.memory_chunk]; + if (!typed_slots) { + typed_slots.reset(new TypedSlots()); } + typed_slots->Insert(info.slot_type, info.offset); } // static @@ -193,7 +194,7 @@ void MarkingBarrier::Deactivate() { is_compacting_ = false; if (is_main_thread_barrier_) { DeactivateSpace(heap_->old_space()); - DeactivateSpace(heap_->map_space()); + if (heap_->map_space()) DeactivateSpace(heap_->map_space()); DeactivateSpace(heap_->code_space()); DeactivateSpace(heap_->new_space()); for (LargePage* p : *heap_->new_lo_space()) { @@ -232,7 +233,7 @@ void MarkingBarrier::Activate(bool is_compacting) { is_activated_ = true; if (is_main_thread_barrier_) { ActivateSpace(heap_->old_space()); - ActivateSpace(heap_->map_space()); + if (heap_->map_space()) ActivateSpace(heap_->map_space()); ActivateSpace(heap_->code_space()); ActivateSpace(heap_->new_space()); |