[WTF] Remove StaticLock
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Apr 2018 17:22:21 +0000 (17:22 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Apr 2018 17:22:21 +0000 (17:22 +0000)
commitd956e86d6558a55183aeed0bb886b3a5b1448260
tree3aac240a8b6f59706ecdf9069a54a1d4ce3923e9
parent8723ec1351d540e949e415731b9f4c945d1fafe9
[WTF] Remove StaticLock
https://bugs.webkit.org/show_bug.cgi?id=184332

Reviewed by Mark Lam.

Source/JavaScriptCore:

* API/JSValue.mm:
(handerForStructTag):
* API/JSVirtualMachine.mm:
(+[JSVMWrapperCache addWrapper:forJSContextGroupRef:]):
(+[JSVMWrapperCache wrapperForJSContextGroupRef:]):
* API/glib/JSCVirtualMachine.cpp:
(addWrapper):
(removeWrapper):
* assembler/testmasm.cpp:
* b3/air/testair.cpp:
* b3/testb3.cpp:
* bytecode/SuperSampler.cpp:
* dfg/DFGCommon.cpp:
* dfg/DFGCommonData.cpp:
* dynbench.cpp:
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::tryCopyOtherThreadStacks):
* inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm:
(Inspector::RemoteTargetHandleRunSourceGlobal):
(Inspector::RemoteTargetQueueTaskOnGlobalQueue):
* interpreter/CLoopStack.cpp:
* parser/SourceProvider.cpp:
* profiler/ProfilerDatabase.cpp:
* profiler/ProfilerUID.cpp:
(JSC::Profiler::UID::create):
* runtime/IntlObject.cpp:
(JSC::numberingSystemsForLocale):
* runtime/JSLock.cpp:
* runtime/JSLock.h:
* runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::registerForReportAtExit):
* runtime/VM.cpp:
* wasm/WasmFaultSignalHandler.cpp:

Source/WebCore:

No behavior change.

* Modules/webdatabase/Database.cpp:
(WebCore::Database::Database):
(WebCore::Database::performOpenAndVerify):
(WebCore::Database::closeDatabase):
(WebCore::Database::getCachedVersion const):
(WebCore::Database::setCachedVersion):
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::openDatabaseMutex):
* Modules/webdatabase/DatabaseTracker.h:
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::allActiveWebSocketsMutex):
* Modules/websockets/WebSocket.h:
* bridge/objc/WebScriptObject.mm:
* crypto/CryptoAlgorithmRegistry.cpp:
(WebCore::CryptoAlgorithmRegistry::identifier):
(WebCore::CryptoAlgorithmRegistry::name):
(WebCore::CryptoAlgorithmRegistry::create):
(WebCore::CryptoAlgorithmRegistry::registerAlgorithm):
* dom/Node.cpp:
* platform/URL.cpp:
* platform/graphics/FontCache.cpp:
* platform/graphics/MediaPlayer.cpp:
* platform/ios/QuickLook.mm:
* platform/ios/WebSQLiteDatabaseTrackerClient.mm:
* platform/ios/wak/WebCoreThread.mm:
* platform/ios/wak/WebCoreThreadRun.cpp:
* platform/network/cf/LoaderRunLoopCF.cpp:
(WebCore::loaderRunLoop):
* platform/network/curl/CurlContext.cpp:
(WebCore::CurlShareHandle::mutexFor):
* platform/network/curl/CurlContext.h:
* platform/sql/SQLiteDatabaseTracker.cpp:
(WebCore::SQLiteDatabaseTracker::incrementTransactionInProgressCount):
(WebCore::SQLiteDatabaseTracker::decrementTransactionInProgressCount):
* platform/text/TextEncodingRegistry.cpp:
(WebCore::buildBaseTextCodecMaps):
(WebCore::newTextCodec):
(WebCore::atomicCanonicalTextEncodingName):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::workerThreadCount):
(WebCore::WorkerThread::WorkerThread):
(WebCore::WorkerThread::~WorkerThread):
(WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):

Source/WebKitLegacy/ios:

* WebCoreSupport/WebFixedPositionContent.mm:

Source/WebKitLegacy/mac:

* DOM/DOMInternal.mm:
(getDOMWrapper):
(addDOMWrapper):
(removeDOMWrapper):

Source/WebKitLegacy/win:

* WebKitQuartzCoreAdditions/CAView.cpp:
(WKQCA::CAView::releaseAllD3DResources):
* WebLocalizableStrings.cpp:

Source/WTF:

Now, WTF::StaticLock is `using StaticLock = Lock`. Lock just works
in either static storage and dynamic storage. Remove StaticLock and
always use Lock.

We also remove StaticWordLock and StaticReadWriteLock. And we add
WTF::RecursiveLock, which is RecursiveLockAdapter<Lock>.

* wtf/HashTable.cpp:
(WTF::HashTableStats::recordCollisionAtCount):
(WTF::HashTableStats::dumpStats):
* wtf/Language.cpp:
(WTF::userPreferredLanguages):
* wtf/Lock.h:
* wtf/MainThread.cpp:
(WTF::dispatchFunctionsFromMainThread):
(WTF::callOnMainThread):
* wtf/ParkingLot.cpp:
* wtf/ReadWriteLock.h:
* wtf/RecursiveLockAdapter.h:
* wtf/StackStats.cpp:
(WTF::StackStats::CheckPoint::CheckPoint):
(WTF::StackStats::CheckPoint::~CheckPoint):
(WTF::StackStats::probe):
(WTF::StackStats::LayoutCheckPoint::LayoutCheckPoint):
(WTF::StackStats::LayoutCheckPoint::~LayoutCheckPoint):
* wtf/StackStats.h:
* wtf/ThreadMessage.cpp:
(WTF::sendMessageScoped):
* wtf/ThreadingPthreads.cpp:
* wtf/ThreadingWin.cpp:
* wtf/WordLock.h:
* wtf/cf/LanguageCF.cpp:
(WTF::languagePreferencesDidChange):
(WTF::platformUserPreferredLanguages):
* wtf/dtoa.cpp:
* wtf/text/AtomicStringImpl.cpp:
* wtf/text/StringView.cpp:
(WTF::StringView::invalidate):
(WTF::StringView::adoptUnderlyingString):
(WTF::StringView::setUnderlyingString):
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::Collator::Collator):
(WTF::Collator::~Collator):
* wtf/win/LanguageWin.cpp:
(WTF::platformLanguage):

Tools:

* DumpRenderTree/JavaScriptThreading.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
74 files changed:
Source/JavaScriptCore/API/JSValue.mm
Source/JavaScriptCore/API/JSVirtualMachine.mm
Source/JavaScriptCore/API/glib/JSCVirtualMachine.cpp
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/assembler/testmasm.cpp
Source/JavaScriptCore/b3/air/testair.cpp
Source/JavaScriptCore/b3/testb3.cpp
Source/JavaScriptCore/bytecode/SuperSampler.cpp
Source/JavaScriptCore/dfg/DFGCommon.cpp
Source/JavaScriptCore/dfg/DFGCommonData.cpp
Source/JavaScriptCore/dynbench.cpp
Source/JavaScriptCore/heap/MachineStackMarker.cpp
Source/JavaScriptCore/inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm
Source/JavaScriptCore/interpreter/CLoopStack.cpp
Source/JavaScriptCore/parser/SourceProvider.cpp
Source/JavaScriptCore/profiler/ProfilerDatabase.cpp
Source/JavaScriptCore/profiler/ProfilerUID.cpp
Source/JavaScriptCore/runtime/IntlObject.cpp
Source/JavaScriptCore/runtime/JSLock.cpp
Source/JavaScriptCore/runtime/JSLock.h
Source/JavaScriptCore/runtime/SamplingProfiler.cpp
Source/JavaScriptCore/runtime/VM.cpp
Source/JavaScriptCore/wasm/WasmFaultSignalHandler.cpp
Source/WTF/ChangeLog
Source/WTF/wtf/HashTable.cpp
Source/WTF/wtf/Language.cpp
Source/WTF/wtf/Lock.h
Source/WTF/wtf/MainThread.cpp
Source/WTF/wtf/ParkingLot.cpp
Source/WTF/wtf/ReadWriteLock.h
Source/WTF/wtf/RecursiveLockAdapter.h
Source/WTF/wtf/StackStats.cpp
Source/WTF/wtf/StackStats.h
Source/WTF/wtf/ThreadMessage.cpp
Source/WTF/wtf/ThreadingPthreads.cpp
Source/WTF/wtf/ThreadingWin.cpp
Source/WTF/wtf/WordLock.h
Source/WTF/wtf/cf/LanguageCF.cpp
Source/WTF/wtf/dtoa.cpp
Source/WTF/wtf/text/AtomicStringImpl.cpp
Source/WTF/wtf/text/StringView.cpp
Source/WTF/wtf/unicode/icu/CollatorICU.cpp
Source/WTF/wtf/win/LanguageWin.cpp
Source/WebCore/ChangeLog
Source/WebCore/Modules/webdatabase/Database.cpp
Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp
Source/WebCore/Modules/webdatabase/DatabaseTracker.h
Source/WebCore/Modules/websockets/WebSocket.cpp
Source/WebCore/Modules/websockets/WebSocket.h
Source/WebCore/bridge/objc/WebScriptObject.mm
Source/WebCore/crypto/CryptoAlgorithmRegistry.cpp
Source/WebCore/dom/Node.cpp
Source/WebCore/platform/URL.cpp
Source/WebCore/platform/graphics/FontCache.cpp
Source/WebCore/platform/graphics/MediaPlayer.cpp
Source/WebCore/platform/ios/QuickLook.mm
Source/WebCore/platform/ios/WebSQLiteDatabaseTrackerClient.mm
Source/WebCore/platform/ios/wak/WebCoreThread.mm
Source/WebCore/platform/ios/wak/WebCoreThreadRun.cpp
Source/WebCore/platform/network/cf/LoaderRunLoopCF.cpp
Source/WebCore/platform/network/curl/CurlContext.cpp
Source/WebCore/platform/network/curl/CurlContext.h
Source/WebCore/platform/sql/SQLiteDatabaseTracker.cpp
Source/WebCore/platform/text/TextEncodingRegistry.cpp
Source/WebCore/workers/WorkerThread.cpp
Source/WebKitLegacy/ios/ChangeLog
Source/WebKitLegacy/ios/WebCoreSupport/WebFixedPositionContent.mm
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/DOM/DOMInternal.mm
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAView.cpp
Source/WebKitLegacy/win/WebLocalizableStrings.cpp
Tools/ChangeLog
Tools/DumpRenderTree/JavaScriptThreading.cpp