Index: src/heap.cc |
=================================================================== |
--- src/heap.cc (revision 11005) |
+++ src/heap.cc (working copy) |
@@ -60,10 +60,9 @@ |
namespace v8 { |
namespace internal { |
+static LazyMutex gc_initializer_mutex = LAZY_MUTEX_INITIALIZER; |
-static Mutex* gc_initializer_mutex = OS::CreateMutex(); |
- |
Heap::Heap() |
: isolate_(NULL), |
// semispace_size_ should be a power of 2 and old_generation_size_ should be |
@@ -5855,7 +5854,7 @@ |
if (!ConfigureHeapDefault()) return false; |
} |
- gc_initializer_mutex->Lock(); |
+ gc_initializer_mutex.Pointer()->Lock(); |
static bool initialized_gc = false; |
if (!initialized_gc) { |
initialized_gc = true; |
@@ -5863,7 +5862,7 @@ |
NewSpaceScavenger::Initialize(); |
MarkCompactCollector::Initialize(); |
} |
- gc_initializer_mutex->Unlock(); |
+ gc_initializer_mutex.Pointer()->Unlock(); |
MarkMapPointersAsEncoded(false); |