| Index: src/heap.cc
|
| diff --git a/src/heap.cc b/src/heap.cc
|
| index fc53eb3529190a3bb2316e9f8c5c771c9baa298b..6c00d034576e4db9ddfd524f54df94b8a259b56e 100644
|
| --- a/src/heap.cc
|
| +++ b/src/heap.cc
|
| @@ -60,8 +60,7 @@
|
| namespace v8 {
|
| namespace internal {
|
|
|
| -
|
| -static Mutex* gc_initializer_mutex = OS::CreateMutex();
|
| +static LazyMutex gc_initializer_mutex = LAZY_MUTEX_INITIALIZER;
|
|
|
|
|
| Heap::Heap()
|
| @@ -5837,7 +5836,7 @@ bool Heap::SetUp(bool create_heap_objects) {
|
| if (!ConfigureHeapDefault()) return false;
|
| }
|
|
|
| - gc_initializer_mutex->Lock();
|
| + gc_initializer_mutex.Pointer()->Lock();
|
| static bool initialized_gc = false;
|
| if (!initialized_gc) {
|
| initialized_gc = true;
|
| @@ -5845,7 +5844,7 @@ bool Heap::SetUp(bool create_heap_objects) {
|
| NewSpaceScavenger::Initialize();
|
| MarkCompactCollector::Initialize();
|
| }
|
| - gc_initializer_mutex->Unlock();
|
| + gc_initializer_mutex.Pointer()->Unlock();
|
|
|
| MarkMapPointersAsEncoded(false);
|
|
|
|
|