diff options
Diffstat (limited to 'deps/v8/src/heap/invalidated-slots.cc')
-rw-r--r-- | deps/v8/src/heap/invalidated-slots.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/deps/v8/src/heap/invalidated-slots.cc b/deps/v8/src/heap/invalidated-slots.cc index 85430e58bc..42042c63ef 100644 --- a/deps/v8/src/heap/invalidated-slots.cc +++ b/deps/v8/src/heap/invalidated-slots.cc @@ -9,8 +9,15 @@ namespace v8 { namespace internal { InvalidatedSlotsFilter::InvalidatedSlotsFilter(MemoryChunk* chunk) { + // Adjust slots_in_free_space_are_valid_ if more spaces are added. DCHECK_IMPLIES(chunk->invalidated_slots() != nullptr, - chunk->owner()->identity() == OLD_SPACE); + chunk->InOldSpace() || chunk->InLargeObjectSpace()); + // The sweeper removes invalid slots and makes free space available for + // allocation. Slots for new objects can be recorded in the free space. + // Note that we cannot simply check for SweepingDone because pages in large + // object space are not swept but have SweepingDone() == true. + slots_in_free_space_are_valid_ = chunk->SweepingDone() && chunk->InOldSpace(); + InvalidatedSlots* invalidated_slots = chunk->invalidated_slots() ? chunk->invalidated_slots() : &empty_; iterator_ = invalidated_slots->begin(); |