| Index: src/heap-profiler.cc
|
| diff --git a/src/heap-profiler.cc b/src/heap-profiler.cc
|
| index 45a93f9e14fbf71a912f447ac558c26a44aad7c2..ca8eda19ac74f0d2e9eb51b21cda1a2f46ed589f 100644
|
| --- a/src/heap-profiler.cc
|
| +++ b/src/heap-profiler.cc
|
| @@ -33,8 +33,8 @@
|
| namespace v8 {
|
| namespace internal {
|
|
|
| -HeapProfiler::HeapProfiler()
|
| - : snapshots_(new HeapSnapshotsCollection()),
|
| +HeapProfiler::HeapProfiler(Heap* heap)
|
| + : snapshots_(new HeapSnapshotsCollection(heap)),
|
| next_snapshot_uid_(1) {
|
| }
|
|
|
| @@ -45,15 +45,16 @@ HeapProfiler::~HeapProfiler() {
|
|
|
|
|
| void HeapProfiler::ResetSnapshots() {
|
| + Heap* the_heap = heap();
|
| delete snapshots_;
|
| - snapshots_ = new HeapSnapshotsCollection();
|
| + snapshots_ = new HeapSnapshotsCollection(the_heap);
|
| }
|
|
|
|
|
| void HeapProfiler::SetUp() {
|
| Isolate* isolate = Isolate::Current();
|
| if (isolate->heap_profiler() == NULL) {
|
| - isolate->set_heap_profiler(new HeapProfiler());
|
| + isolate->set_heap_profiler(new HeapProfiler(isolate->heap()));
|
| }
|
| }
|
|
|
| @@ -139,7 +140,7 @@ HeapSnapshot* HeapProfiler::TakeSnapshotImpl(
|
| bool generation_completed = true;
|
| switch (s_type) {
|
| case HeapSnapshot::kFull: {
|
| - HeapSnapshotGenerator generator(result, control, resolver);
|
| + HeapSnapshotGenerator generator(result, control, resolver, heap());
|
| generation_completed = generator.GenerateSnapshot();
|
| break;
|
| }
|
|
|