Web Worker crashes with WX_EXCLUSIVE
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Mar 2012 17:38:42 +0000 (17:38 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Mar 2012 17:38:42 +0000 (17:38 +0000)
commit0683e80b123e757a9e3621e46f4c609c4e0e19d1
tree566b028a46526f949755e70d8cdc557efbf74c3e
parent2e73d941be8789c415fc68ee3ea5c672d370e040
Web Worker crashes with WX_EXCLUSIVE
https://bugs.webkit.org/show_bug.cgi?id=80532

Let each JS global object own a meta allocator
for WX_EXCLUSIVE to avoid conflicts from Web Worker.
Also fix a mutex leak in MetaAllocator's dtor.

Patch by Yong Li <yoli@rim.com> on 2012-03-10
Reviewed by Filip Pizlo.

* jit/ExecutableAllocator.cpp:
(JSC::DemandExecutableAllocator::DemandExecutableAllocator):
(JSC::DemandExecutableAllocator::~DemandExecutableAllocator):
(JSC::DemandExecutableAllocator::bytesAllocatedByAllAllocators):
(DemandExecutableAllocator):
(JSC::DemandExecutableAllocator::bytesCommittedByAllocactors):
(JSC::DemandExecutableAllocator::dumpProfileFromAllAllocators):
(JSC::DemandExecutableAllocator::allocateNewSpace):
(JSC::DemandExecutableAllocator::allocators):
(JSC::DemandExecutableAllocator::allocatorsMutex):
(JSC):
(JSC::ExecutableAllocator::initializeAllocator):
(JSC::ExecutableAllocator::ExecutableAllocator):
(JSC::ExecutableAllocator::underMemoryPressure):
(JSC::ExecutableAllocator::memoryPressureMultiplier):
(JSC::ExecutableAllocator::allocate):
(JSC::ExecutableAllocator::committedByteCount):
(JSC::ExecutableAllocator::dumpProfile):
* jit/ExecutableAllocator.h:
(JSC):
(ExecutableAllocator):
(JSC::ExecutableAllocator::allocator):
* wtf/MetaAllocator.h:
(WTF::MetaAllocator::~MetaAllocator): Finalize the spin lock.
* wtf/TCSpinLock.h:
(TCMalloc_SpinLock::Finalize): Add empty Finalize() to some implementations.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/jit/ExecutableAllocator.cpp
Source/JavaScriptCore/jit/ExecutableAllocator.h
Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
Source/JavaScriptCore/wtf/MetaAllocator.h
Source/JavaScriptCore/wtf/TCSpinLock.h