diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-11-23 15:05:51 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-11-23 15:31:48 +0000 |
commit | 9cb87fa7638e305ef35b04f54ba07ac4fa04adcb (patch) | |
tree | 2793d80883b7daab67258117755046d428f9978c /chromium/third_party/WebKit/Source/wtf/Partitions.cpp | |
parent | 98ff39cb35ef2bd32bb1af9565628a4a4b0979b2 (diff) | |
download | qtwebengine-chromium-9cb87fa7638e305ef35b04f54ba07ac4fa04adcb.tar.gz |
BASELINE: Update Chromium to 47.0.2526.71
Also adds a few missing spellcheck sources.
Change-Id: I300864710316ff3cd3ad456dd7a3d048b45f57d5
Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'chromium/third_party/WebKit/Source/wtf/Partitions.cpp')
-rw-r--r-- | chromium/third_party/WebKit/Source/wtf/Partitions.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/chromium/third_party/WebKit/Source/wtf/Partitions.cpp b/chromium/third_party/WebKit/Source/wtf/Partitions.cpp index 60b30dbba20..64e3b2f1276 100644 --- a/chromium/third_party/WebKit/Source/wtf/Partitions.cpp +++ b/chromium/third_party/WebKit/Source/wtf/Partitions.cpp @@ -73,18 +73,26 @@ void Partitions::setHistogramEnumeration(HistogramEnumerationFunction histogramE void Partitions::shutdown() { + 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 // the valgrind and heapcheck bots, which run without partitions. - (void) m_layoutAllocator.shutdown(); - (void) m_nodeAllocator.shutdown(); - (void) m_bufferAllocator.shutdown(); - (void) m_fastMallocAllocator.shutdown(); + if (s_initialized) { + (void) m_layoutAllocator.shutdown(); + (void) m_nodeAllocator.shutdown(); + (void) m_bufferAllocator.shutdown(); + (void) m_fastMallocAllocator.shutdown(); + } + + spinLockUnlock(&s_initializationLock); } void Partitions::decommitFreeableMemory() { - ASSERT(isMainThread()); + RELEASE_ASSERT(isMainThread()); + if (!s_initialized) + return; partitionPurgeMemoryGeneric(bufferPartition(), PartitionPurgeDecommitEmptyPages); partitionPurgeMemoryGeneric(fastMallocPartition(), PartitionPurgeDecommitEmptyPages); |