Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 8e7596916ac12f031c9c2f537677c530540cdb67..9d05c92f1e32271f5940037ed2662f47d34de509 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -137,7 +137,7 @@ Heap::Heap() |
scavenge_collector_(nullptr), |
mark_compact_collector_(nullptr), |
memory_allocator_(nullptr), |
- store_buffer_(this), |
+ store_buffer_(nullptr), |
incremental_marking_(nullptr), |
gc_idle_time_handler_(nullptr), |
memory_reducer_(nullptr), |
@@ -5265,6 +5265,9 @@ bool Heap::SetUp() { |
code_range_size_)) |
return false; |
+ // Initialize store buffer. |
+ store_buffer_ = new StoreBuffer(this); |
+ |
// Initialize incremental marking. |
incremental_marking_ = new IncrementalMarking(this); |
@@ -5538,6 +5541,9 @@ void Heap::TearDown() { |
} |
strong_roots_list_ = NULL; |
+ delete store_buffer_; |
+ store_buffer_ = nullptr; |
+ |
delete memory_allocator_; |
memory_allocator_ = nullptr; |
} |