Index: src/heap/spaces.cc |
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc |
index cbf62bdb2d339166c2c293cb9267c8a560d6d3e0..94cdc86e3ee905de3047c31bc8835eb328ae66b0 100644 |
--- a/src/heap/spaces.cc |
+++ b/src/heap/spaces.cc |
@@ -518,6 +518,7 @@ MemoryChunk* MemoryChunk::Initialize(Heap* heap, Address base, size_t size, |
Bitmap::Clear(chunk); |
chunk->set_next_chunk(nullptr); |
chunk->set_prev_chunk(nullptr); |
+ chunk->local_tracker_ = nullptr; |
DCHECK(OFFSET_OF(MemoryChunk, flags_) == kFlagsOffset); |
DCHECK(OFFSET_OF(MemoryChunk, live_byte_count_) == kLiveBytesOffset); |
@@ -1039,6 +1040,11 @@ void MemoryChunk::ReleaseAllocatedMemory() { |
if (old_to_old_slots_ != nullptr) ReleaseOldToOldSlots(); |
if (typed_old_to_new_slots_ != nullptr) ReleaseTypedOldToNewSlots(); |
if (typed_old_to_old_slots_ != nullptr) ReleaseTypedOldToOldSlots(); |
+ |
+ if (local_tracker_ != nullptr) { |
+ delete local_tracker_; |
+ local_tracker_ = nullptr; |
+ } |
} |
static SlotSet* AllocateSlotSet(size_t size, Address page_start) { |