| Index: src/heap.cc
|
| diff --git a/src/heap.cc b/src/heap.cc
|
| index 765081a9ca874d035478c80a7ee85dadf3d6eea4..5f6ec663e247a39278f254ff0b4494520aa809fe 100644
|
| --- a/src/heap.cc
|
| +++ b/src/heap.cc
|
| @@ -155,7 +155,8 @@ Heap::Heap()
|
| scavenges_since_last_idle_round_(kIdleScavengeThreshold),
|
| promotion_queue_(this),
|
| configured_(false),
|
| - chunks_queued_for_free_(NULL) {
|
| + chunks_queued_for_free_(NULL),
|
| + relocation_mutex_(NULL) {
|
| // Allow build-time customization of the max semispace size. Building
|
| // V8 with snapshots and a non-default max semispace size is much
|
| // easier if you can define it as part of the build environment.
|
| @@ -1199,6 +1200,7 @@ class ScavengeWeakObjectRetainer : public WeakObjectRetainer {
|
|
|
|
|
| void Heap::Scavenge() {
|
| + RelocationLock relocation_lock(this);
|
| #ifdef DEBUG
|
| if (FLAG_verify_heap) VerifyNonPointerSpacePointers();
|
| #endif
|
| @@ -6156,6 +6158,8 @@ bool Heap::SetUp(bool create_heap_objects) {
|
|
|
| store_buffer()->SetUp();
|
|
|
| + if (FLAG_parallel_recompilation) relocation_mutex_ = OS::CreateMutex();
|
| +
|
| return true;
|
| }
|
|
|
| @@ -6241,6 +6245,8 @@ void Heap::TearDown() {
|
|
|
| isolate_->memory_allocator()->TearDown();
|
|
|
| + delete relocation_mutex_;
|
| +
|
| #ifdef DEBUG
|
| delete debug_utils_;
|
| debug_utils_ = NULL;
|
|
|