diff --git a/src/heap/cppgc-js/unified-heap-marking-state-inl.h b/src/heap/cppgc-js/unified-heap-marking-state-inl.h index fd4d7cf97f..888bbd0c43 100644 --- a/src/heap/cppgc-js/unified-heap-marking-state-inl.h +++ b/src/heap/cppgc-js/unified-heap-marking-state-inl.h @@ -46,7 +46,6 @@ void UnifiedHeapMarkingState::MarkAndPush( return; } HeapObject heap_object = HeapObject::cast(object); - if (heap_object.InReadOnlySpace()) return; if (marking_state_->WhiteToGrey(heap_object)) { local_marking_worklist_->Push(heap_object); } diff --git a/src/heap/marking-barrier-inl.h b/src/heap/marking-barrier-inl.h index b1eea01acc..4a9761abd4 100644 --- a/src/heap/marking-barrier-inl.h +++ b/src/heap/marking-barrier-inl.h @@ -70,7 +70,6 @@ void MarkingBarrier::MarkValueShared(HeapObject value) { } void MarkingBarrier::MarkValueLocal(HeapObject value) { - DCHECK(!value.InReadOnlySpace()); if (is_minor()) { // We do not need to insert into RememberedSet here because the // C++ marking barrier already does this for us. diff --git a/src/heap/marking-barrier.cc b/src/heap/marking-barrier.cc index 9ce722b47a..5a31efd1d1 100644 --- a/src/heap/marking-barrier.cc +++ b/src/heap/marking-barrier.cc @@ -60,7 +60,7 @@ void MarkingBarrier::WriteWithoutHost(HeapObject value) { return; } } - if (value.InReadOnlySpace()) return; + MarkValueLocal(value); }