| Index: src/heap.cc
|
| diff --git a/src/heap.cc b/src/heap.cc
|
| index e0b1e50f1863f7ee172148b3173109e3e2e173d9..53ca75f407b12a0db7b0bb8459d01912052935a7 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()
|
| @@ -5847,7 +5846,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;
|
| @@ -5855,7 +5854,7 @@ bool Heap::SetUp(bool create_heap_objects) {
|
| NewSpaceScavenger::Initialize();
|
| MarkCompactCollector::Initialize();
|
| }
|
| - gc_initializer_mutex->Unlock();
|
| + gc_initializer_mutex.Pointer()->Unlock();
|
|
|
| MarkMapPointersAsEncoded(false);
|
|
|
|
|