Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(351)

Unified Diff: src/heap/heap.cc

Issue 2194793005: [heap] No leakage of store-buffer.h outside of heap. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/heap-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/heap-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698