diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/wtf/PartitionAlloc.cpp')
-rw-r--r-- | chromium/third_party/WebKit/Source/wtf/PartitionAlloc.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chromium/third_party/WebKit/Source/wtf/PartitionAlloc.cpp b/chromium/third_party/WebKit/Source/wtf/PartitionAlloc.cpp index d076568fcfc..8a4b0dec169 100644 --- a/chromium/third_party/WebKit/Source/wtf/PartitionAlloc.cpp +++ b/chromium/third_party/WebKit/Source/wtf/PartitionAlloc.cpp @@ -164,9 +164,9 @@ void partitionAllocInit(PartitionRoot* root, size_t numBuckets, size_t maxAlloca void partitionAllocGenericInit(PartitionRootGeneric* root) { - partitionAllocBaseInit(root); + spinLockLock(&root->lock); - root->lock = 0; + partitionAllocBaseInit(root); // Precalculate some shift and mask constants used in the hot path. // Example: malloc(41) == 101001 binary. @@ -241,6 +241,8 @@ void partitionAllocGenericInit(PartitionRootGeneric* root) // And there's one last bucket lookup that will be hit for e.g. malloc(-1), // which tries to overflow to a non-existant order. *bucketPtr = &PartitionRootGeneric::gPagedBucket; + + spinLockUnlock(&root->lock); } static bool partitionAllocShutdownBucket(PartitionBucket* bucket) |