Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index 5d4bc89b998a84b77c18f4579f8ba0f95425fd81..b7fb0ad3cf38c4fb748c48dc7289405a6e52b76d 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -1679,6 +1679,7 @@ Isolate::Isolate() |
code_stub_interface_descriptors_(NULL), |
context_exit_happened_(false), |
cpu_profiler_(NULL), |
+ heap_profiler_(NULL), |
deferred_handles_head_(NULL), |
optimizing_compiler_thread_(this), |
marking_thread_(NULL), |
@@ -1810,7 +1811,8 @@ void Isolate::Deinit() { |
preallocated_message_space_ = NULL; |
PreallocatedMemoryThreadStop(); |
- HeapProfiler::TearDown(); |
+ delete heap_profiler_; |
+ heap_profiler_ = NULL; |
delete cpu_profiler_; |
cpu_profiler_ = NULL; |
@@ -2043,7 +2045,7 @@ bool Isolate::Init(Deserializer* des) { |
logger_->SetUp(); |
cpu_profiler_ = new CpuProfiler(this); |
- HeapProfiler::SetUp(); |
+ heap_profiler_ = new HeapProfiler(heap()); |
// Initialize other runtime facilities |
#if defined(USE_SIMULATOR) |