| Index: third_party/WebKit/Source/wtf/Partitions.cpp
|
| diff --git a/third_party/WebKit/Source/wtf/Partitions.cpp b/third_party/WebKit/Source/wtf/Partitions.cpp
|
| index 2e97e011efebd74f183c15f915778ec8ca7b9a0e..39914b4a9c89e2712cf0ac58fb024839bfaaa612 100644
|
| --- a/third_party/WebKit/Source/wtf/Partitions.cpp
|
| +++ b/third_party/WebKit/Source/wtf/Partitions.cpp
|
| @@ -39,7 +39,7 @@
|
|
|
| const char* const Partitions::kAllocatedObjectPoolName = "partition_alloc/allocated_objects";
|
|
|
| -SpinLock Partitions::s_initializationLock;
|
| +int Partitions::s_initializationLock = 0;
|
| bool Partitions::s_initialized = false;
|
|
|
| PartitionAllocatorGeneric Partitions::m_fastMallocAllocator;
|
| @@ -50,7 +50,7 @@
|
|
|
| void Partitions::initialize(HistogramEnumerationFunction histogramEnumeration)
|
| {
|
| - SpinLock::Guard guard(s_initializationLock);
|
| + spinLockLock(&s_initializationLock);
|
|
|
| if (!s_initialized) {
|
| partitionAllocGlobalInit(&Partitions::handleOutOfMemory);
|
| @@ -61,11 +61,13 @@
|
| m_histogramEnumeration = histogramEnumeration;
|
| s_initialized = true;
|
| }
|
| +
|
| + spinLockUnlock(&s_initializationLock);
|
| }
|
|
|
| void Partitions::shutdown()
|
| {
|
| - SpinLock::Guard guard(s_initializationLock);
|
| + spinLockLock(&s_initializationLock);
|
|
|
| // We could ASSERT here for a memory leak within the partition, but it leads
|
| // to very hard to diagnose ASSERTs, so it's best to leave leak checking for
|
| @@ -76,6 +78,8 @@
|
| (void) m_bufferAllocator.shutdown();
|
| (void) m_fastMallocAllocator.shutdown();
|
| }
|
| +
|
| + spinLockUnlock(&s_initializationLock);
|
| }
|
|
|
| void Partitions::decommitFreeableMemory()
|
|
|