Changeset 187972 in webkit


Ignore:
Timestamp:
Aug 5, 2015, 12:20:22 PM (10 years ago)
Author:
[email protected]
Message:

Rename Mutex to DeprecatedMutex
https://bugs.webkit.org/show_bug.cgi?id=147675

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • bytecode/SamplingTool.cpp:

(JSC::SamplingTool::doRun):
(JSC::SamplingTool::notifyOfScope):

  • bytecode/SamplingTool.h:
  • dfg/DFGThreadData.h:
  • dfg/DFGWorklist.cpp:

(JSC::DFG::Worklist::~Worklist):
(JSC::DFG::Worklist::isActiveForVM):
(JSC::DFG::Worklist::enqueue):
(JSC::DFG::Worklist::compilationState):
(JSC::DFG::Worklist::waitUntilAllPlansForVMAreReady):
(JSC::DFG::Worklist::removeAllReadyPlansForVM):
(JSC::DFG::Worklist::completeAllReadyPlansForVM):
(JSC::DFG::Worklist::visitWeakReferences):
(JSC::DFG::Worklist::removeDeadPlans):
(JSC::DFG::Worklist::queueLength):
(JSC::DFG::Worklist::dump):
(JSC::DFG::Worklist::runThread):

  • dfg/DFGWorklist.h:
  • disassembler/Disassembler.cpp:
  • heap/CopiedSpace.cpp:

(JSC::CopiedSpace::doneFillingBlock):
(JSC::CopiedSpace::doneCopying):

  • heap/CopiedSpace.h:
  • heap/CopiedSpaceInlines.h:

(JSC::CopiedSpace::recycleBorrowedBlock):
(JSC::CopiedSpace::allocateBlockForCopyingPhase):

  • heap/HeapTimer.h:
  • heap/MachineStackMarker.cpp:

(JSC::ActiveMachineThreadsManager::Locker::Locker):
(JSC::ActiveMachineThreadsManager::add):
(JSC::ActiveMachineThreadsManager::remove):
(JSC::ActiveMachineThreadsManager::ActiveMachineThreadsManager):
(JSC::MachineThreads::~MachineThreads):
(JSC::MachineThreads::addCurrentThread):
(JSC::MachineThreads::removeThreadIfFound):
(JSC::MachineThreads::tryCopyOtherThreadStack):
(JSC::MachineThreads::tryCopyOtherThreadStacks):
(JSC::MachineThreads::gatherConservativeRoots):

  • heap/MachineStackMarker.h:
  • interpreter/JSStack.cpp:

(JSC::stackStatisticsMutex):
(JSC::JSStack::addToCommittedByteCount):
(JSC::JSStack::committedByteCount):

  • jit/JITThunks.h:
  • profiler/ProfilerDatabase.h:

Source/WebCore:

No new tests because this is just a renaming.

  • Modules/webaudio/AsyncAudioDecoder.cpp:

(WebCore::AsyncAudioDecoder::AsyncAudioDecoder):
(WebCore::AsyncAudioDecoder::runLoop):

  • Modules/webaudio/AsyncAudioDecoder.h:
  • Modules/webaudio/AudioContext.h:
  • Modules/webaudio/MediaStreamAudioSource.cpp:

(WebCore::MediaStreamAudioSource::addAudioConsumer):
(WebCore::MediaStreamAudioSource::removeAudioConsumer):
(WebCore::MediaStreamAudioSource::setAudioFormat):
(WebCore::MediaStreamAudioSource::consumeAudio):

  • Modules/webaudio/MediaStreamAudioSource.h:
  • Modules/webdatabase/Database.cpp:

(WebCore::Database::close):
(WebCore::Database::runTransaction):
(WebCore::Database::inProgressTransactionCompleted):
(WebCore::Database::hasPendingTransaction):

  • Modules/webdatabase/DatabaseBackend.h:
  • Modules/webdatabase/DatabaseBackendBase.cpp:

(WebCore::DatabaseBackendBase::performOpenAndVerify):
(WebCore::DatabaseBackendBase::isInterrupted):

  • Modules/webdatabase/DatabaseContext.cpp:

(WebCore::DatabaseContext::databaseThread):
(WebCore::DatabaseContext::setPaused):

  • Modules/webdatabase/DatabaseContext.h:
  • Modules/webdatabase/DatabaseTask.h:
  • Modules/webdatabase/DatabaseThread.cpp:

(WebCore::DatabaseThread::start):
(WebCore::DatabaseThread::setPaused):
(WebCore::DatabaseThread::handlePausedQueue):
(WebCore::DatabaseThread::databaseThread):

  • Modules/webdatabase/DatabaseThread.h:
  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::DatabaseTracker::setDatabaseDirectoryPath):
(WebCore::DatabaseTracker::canEstablishDatabase):
(WebCore::DatabaseTracker::retryCanEstablishDatabase):
(WebCore::DatabaseTracker::hasEntryForOrigin):
(WebCore::DatabaseTracker::getMaxSizeForDatabase):
(WebCore::DatabaseTracker::closeAllDatabases):
(WebCore::DatabaseTracker::interruptAllDatabasesForContext):
(WebCore::DatabaseTracker::fullPathForDatabase):
(WebCore::DatabaseTracker::origins):
(WebCore::DatabaseTracker::databaseNamesForOrigin):
(WebCore::DatabaseTracker::detailsForNameAndOrigin):
(WebCore::DatabaseTracker::setDatabaseDetails):
(WebCore::DatabaseTracker::doneCreatingDatabase):
(WebCore::DatabaseTracker::addOpenDatabase):
(WebCore::DatabaseTracker::removeOpenDatabase):
(WebCore::DatabaseTracker::getOpenDatabases):
(WebCore::DatabaseTracker::originLockFor):
(WebCore::DatabaseTracker::quotaForOrigin):
(WebCore::DatabaseTracker::setQuota):
(WebCore::DatabaseTracker::deleteOrigin):
(WebCore::DatabaseTracker::deleteDatabase):
(WebCore::DatabaseTracker::deleteDatabaseFile):
(WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
(WebCore::DatabaseTracker::deleteDatabaseFileIfEmpty):
(WebCore::DatabaseTracker::openDatabaseMutex):
(WebCore::DatabaseTracker::setDatabasesPaused):
(WebCore::DatabaseTracker::setClient):
(WebCore::notificationMutex):
(WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
(WebCore::DatabaseTracker::notifyDatabasesChanged):

  • Modules/webdatabase/DatabaseTracker.h:
  • Modules/webdatabase/OriginLock.h:
  • Modules/webdatabase/SQLCallbackWrapper.h:

(WebCore::SQLCallbackWrapper::clear):
(WebCore::SQLCallbackWrapper::unwrap):
(WebCore::SQLCallbackWrapper::hasCallback):

  • Modules/webdatabase/SQLTransactionBackend.cpp:

(WebCore::SQLTransactionBackend::doCleanup):
(WebCore::SQLTransactionBackend::enqueueStatementBackend):
(WebCore::SQLTransactionBackend::getNextStatement):

  • Modules/webdatabase/SQLTransactionBackend.h:
  • bindings/js/WorkerScriptController.cpp:

(WebCore::WorkerScriptController::scheduleExecutionTermination):
(WebCore::WorkerScriptController::isExecutionTerminating):

  • bindings/js/WorkerScriptController.h:
  • dom/default/PlatformMessagePortChannel.cpp:

(WebCore::MessagePortChannel::postMessageToRemote):
(WebCore::MessagePortChannel::tryGetMessageFromRemote):
(WebCore::MessagePortChannel::isConnectedTo):
(WebCore::MessagePortChannel::hasPendingActivity):
(WebCore::MessagePortChannel::locallyEntangledPort):
(WebCore::PlatformMessagePortChannel::setRemotePort):
(WebCore::PlatformMessagePortChannel::entangledChannel):
(WebCore::PlatformMessagePortChannel::closeInternal):

  • dom/default/PlatformMessagePortChannel.h:
  • loader/icon/IconDatabase.cpp:

(WebCore::IconDatabase::removeAllIcons):
(WebCore::IconDatabase::synchronousIconForPageURL):
(WebCore::IconDatabase::synchronousNativeIconForPageURL):
(WebCore::IconDatabase::synchronousIconURLForPageURL):
(WebCore::IconDatabase::retainIconForPageURL):
(WebCore::IconDatabase::performRetainIconForPageURL):
(WebCore::IconDatabase::releaseIconForPageURL):
(WebCore::IconDatabase::performReleaseIconForPageURL):
(WebCore::IconDatabase::setIconDataForIconURL):
(WebCore::IconDatabase::setIconURLForPageURL):
(WebCore::IconDatabase::synchronousLoadDecisionForIconURL):
(WebCore::IconDatabase::synchronousIconDataKnownForIconURL):
(WebCore::IconDatabase::pageURLMappingCount):
(WebCore::IconDatabase::retainedPageURLCount):
(WebCore::IconDatabase::iconRecordCount):
(WebCore::IconDatabase::iconRecordCountWithData):
(WebCore::IconDatabase::wakeSyncThread):
(WebCore::IconDatabase::isOpenBesidesMainThreadCallbacks):
(WebCore::IconDatabase::databasePath):
(WebCore::IconDatabase::getOrCreatePageURLRecord):
(WebCore::IconDatabase::iconDatabaseSyncThread):
(WebCore::IconDatabase::performOpenInitialization):
(WebCore::IconDatabase::performURLImport):
(WebCore::IconDatabase::syncThreadMainLoop):
(WebCore::IconDatabase::performPendingRetainAndReleaseOperations):
(WebCore::IconDatabase::readFromDatabase):
(WebCore::IconDatabase::writeToDatabase):
(WebCore::IconDatabase::pruneUnretainedIcons):
(WebCore::IconDatabase::cleanupSyncThread):

  • loader/icon/IconDatabase.h:
  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
(WebCore::ScrollingTree::commitNewTreeState):
(WebCore::ScrollingTree::setMainFramePinState):
(WebCore::ScrollingTree::mainFrameScrollPosition):
(WebCore::ScrollingTree::setMainFrameScrollPosition):
(WebCore::ScrollingTree::isPointInNonFastScrollableRegion):
(WebCore::ScrollingTree::isRubberBandInProgress):
(WebCore::ScrollingTree::setMainFrameIsRubberBanding):
(WebCore::ScrollingTree::isScrollSnapInProgress):
(WebCore::ScrollingTree::setMainFrameIsScrollSnapping):
(WebCore::ScrollingTree::setCanRubberBandState):
(WebCore::ScrollingTree::rubberBandsAtLeft):
(WebCore::ScrollingTree::rubberBandsAtRight):
(WebCore::ScrollingTree::rubberBandsAtBottom):
(WebCore::ScrollingTree::rubberBandsAtTop):
(WebCore::ScrollingTree::setScrollPinningBehavior):
(WebCore::ScrollingTree::scrollPinningBehavior):
(WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
(WebCore::ScrollingTree::latchedNode):
(WebCore::ScrollingTree::setLatchedNode):
(WebCore::ScrollingTree::clearLatchedNode):

  • page/scrolling/ScrollingTree.h:
  • platform/MemoryPressureHandler.h:
  • platform/audio/HRTFDatabaseLoader.cpp:

(WebCore::HRTFDatabaseLoader::loadAsynchronously):
(WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):

  • platform/audio/HRTFDatabaseLoader.h:
  • platform/cocoa/MemoryPressureHandlerCocoa.mm:

(WebCore::MemoryPressureHandler::setReceivedMemoryPressure):
(WebCore::MemoryPressureHandler::clearMemoryPressure):
(WebCore::MemoryPressureHandler::shouldWaitForMemoryClearMessage):
(WebCore::MemoryPressureHandler::respondToMemoryPressureIfNeeded):

  • platform/graphics/DisplayRefreshMonitor.cpp:

(WebCore::DisplayRefreshMonitor::displayDidRefresh):

  • platform/graphics/DisplayRefreshMonitor.h:

(WebCore::DisplayRefreshMonitor::setMonotonicAnimationStartTime):
(WebCore::DisplayRefreshMonitor::mutex):

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:

(WebCore::MediaPlayerPrivateAVFoundation::setDelayCallbacks):
(WebCore::MediaPlayerPrivateAVFoundation::clearMainThreadPendingFlag):
(WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
  • platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:

(WebCore::AVFWrapper::callbackContext):
(WebCore::AVFWrapper::~AVFWrapper):
(WebCore::AVFWrapper::mapLock):
(WebCore::AVFWrapper::addToMap):
(WebCore::AVFWrapper::removeFromMap):
(WebCore::AVFWrapper::periodicTimeObserverCallback):
(WebCore::AVFWrapper::processNotification):
(WebCore::AVFWrapper::loadPlayableCompletionCallback):
(WebCore::AVFWrapper::loadMetadataCompletionCallback):
(WebCore::AVFWrapper::seekCompletedCallback):
(WebCore::AVFWrapper::processCue):
(WebCore::AVFWrapper::legibleOutputCallback):
(WebCore::AVFWrapper::processShouldWaitForLoadingOfResource):
(WebCore::AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource):

  • platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:

(WebCore::InbandTextTrackPrivateGStreamer::handleSample):
(WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):

  • platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
  • platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:

(WebCore::TrackPrivateBaseGStreamer::tagsChanged):
(WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):

  • platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
  • platform/graphics/mac/DisplayRefreshMonitorMac.cpp:

(WebCore::DisplayRefreshMonitorMac::requestRefreshCallback):
(WebCore::DisplayRefreshMonitorMac::displayLinkFired):

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:

(WebCore::MediaPlayerPrivateMediaFoundation::addListener):
(WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
(WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
  • platform/ios/LegacyTileCache.h:
  • platform/ios/LegacyTileCache.mm:

(WebCore::LegacyTileCache::setTilesOpaque):
(WebCore::LegacyTileCache::doLayoutTiles):
(WebCore::LegacyTileCache::setCurrentScale):
(WebCore::LegacyTileCache::commitScaleChange):
(WebCore::LegacyTileCache::layoutTilesNow):
(WebCore::LegacyTileCache::layoutTilesNowForRect):
(WebCore::LegacyTileCache::removeAllNonVisibleTiles):
(WebCore::LegacyTileCache::removeAllTiles):
(WebCore::LegacyTileCache::removeForegroundTiles):
(WebCore::LegacyTileCache::setContentReplacementImage):
(WebCore::LegacyTileCache::contentReplacementImage):
(WebCore::LegacyTileCache::tileCreationTimerFired):
(WebCore::LegacyTileCache::setNeedsDisplayInRect):
(WebCore::LegacyTileCache::updateTilingMode):
(WebCore::LegacyTileCache::setTilingMode):
(WebCore::LegacyTileCache::doPendingRepaints):
(WebCore::LegacyTileCache::flushSavedDisplayRects):
(WebCore::LegacyTileCache::prepareToDraw):

  • platform/ios/LegacyTileLayerPool.h:
  • platform/ios/LegacyTileLayerPool.mm:

(WebCore::LegacyTileLayerPool::addLayer):
(WebCore::LegacyTileLayerPool::takeLayerWithSize):
(WebCore::LegacyTileLayerPool::setCapacity):
(WebCore::LegacyTileLayerPool::prune):
(WebCore::LegacyTileLayerPool::drain):

  • platform/network/curl/CurlDownload.cpp:

(WebCore::CurlDownloadManager::add):
(WebCore::CurlDownloadManager::remove):
(WebCore::CurlDownloadManager::getActiveDownloadCount):
(WebCore::CurlDownloadManager::getPendingDownloadCount):
(WebCore::CurlDownloadManager::stopThreadIfIdle):
(WebCore::CurlDownloadManager::updateHandleList):
(WebCore::CurlDownload::~CurlDownload):
(WebCore::CurlDownload::init):
(WebCore::CurlDownload::getTempPath):
(WebCore::CurlDownload::getUrl):
(WebCore::CurlDownload::getResponse):
(WebCore::CurlDownload::closeFile):
(WebCore::CurlDownload::didReceiveHeader):
(WebCore::CurlDownload::didReceiveData):
(WebCore::CurlDownload::didFail):

  • platform/network/curl/CurlDownload.h:
  • platform/network/curl/ResourceHandleManager.cpp:

(WebCore::cookieJarPath):
(WebCore::sharedResourceMutex):
(WebCore::curl_lock_callback):
(WebCore::curl_unlock_callback):

  • platform/network/ios/QuickLook.mm:

(WebCore::QLDirectoryAttributes):
(qlPreviewConverterDictionaryMutex):
(WebCore::addQLPreviewConverterWithFileForURL):
(WebCore::qlPreviewConverterUTIForURL):
(WebCore::removeQLPreviewConverterForURL):
(WebCore::safeQLURLForDocumentURLAndResourceURL):

  • platform/sql/SQLiteDatabase.cpp:

(WebCore::SQLiteDatabase::close):
(WebCore::SQLiteDatabase::interrupt):
(WebCore::SQLiteDatabase::maximumSize):
(WebCore::SQLiteDatabase::setMaximumSize):
(WebCore::SQLiteDatabase::pageSize):
(WebCore::SQLiteDatabase::freeSpaceSize):
(WebCore::SQLiteDatabase::totalSize):
(WebCore::SQLiteDatabase::runIncrementalVacuumCommand):
(WebCore::SQLiteDatabase::setAuthorizer):

  • platform/sql/SQLiteDatabase.h:

(WebCore::SQLiteDatabase::databaseMutex):

  • platform/sql/SQLiteStatement.cpp:

(WebCore::SQLiteStatement::prepare):
(WebCore::SQLiteStatement::step):

  • workers/WorkerThread.cpp:

(WebCore::WorkerThread::start):
(WebCore::WorkerThread::workerThread):
(WebCore::WorkerThread::stop):

  • workers/WorkerThread.h:

Source/WebKit:

  • Storage/StorageAreaSync.cpp:

(WebCore::StorageAreaSync::syncTimerFired):
(WebCore::StorageAreaSync::markImported):
(WebCore::StorageAreaSync::blockUntilImportComplete):
(WebCore::StorageAreaSync::performSync):

  • Storage/StorageAreaSync.h:
  • Storage/StorageTracker.cpp:

(WebCore::StorageTracker::setDatabaseDirectoryPath):
(WebCore::StorageTracker::finishedImportingOriginIdentifiers):
(WebCore::StorageTracker::syncImportOriginIdentifiers):
(WebCore::StorageTracker::syncFileSystemAndTrackerDatabase):
(WebCore::StorageTracker::setOriginDetails):
(WebCore::StorageTracker::syncSetOriginDetails):
(WebCore::StorageTracker::origins):
(WebCore::StorageTracker::deleteAllOrigins):
(WebCore::StorageTracker::syncDeleteAllOrigins):
(WebCore::StorageTracker::deleteOrigin):
(WebCore::StorageTracker::syncDeleteOrigin):
(WebCore::StorageTracker::canDeleteOrigin):
(WebCore::StorageTracker::cancelDeletingOrigin):
(WebCore::StorageTracker::diskUsageForOrigin):

  • Storage/StorageTracker.h:

Source/WebKit/ios:

  • WebCoreSupport/WebFixedPositionContent.mm:

(WebFixedPositionContentDataLock):
(-[WebFixedPositionContent scrollOrZoomChanged:]):
(-[WebFixedPositionContent overflowScrollPositionForLayer:changedTo:]):
(-[WebFixedPositionContent setViewportConstrainedLayers:stickyContainerMap:]):
(-[WebFixedPositionContent hasFixedOrStickyPositionLayers]):
(-[WebFixedPositionContent minimumOffsetFromFixedPositionLayersToAnchorEdge:ofRect:inLayer:]):

Source/WebKit/mac:

  • Storage/WebDatabaseManager.mm:

(transactionBackgroundTaskIdentifierLock):
(+[WebDatabaseManager startBackgroundTask]):
(+[WebDatabaseManager endBackgroundTask]):

  • WebView/WebView.mm:

(-[WebView _synchronizeCustomFixedPositionLayoutRect]):
(-[WebView _setCustomFixedPositionLayoutRectInWebThread:synchronize:]):
(-[WebView _setCustomFixedPositionLayoutRect:]):
(-[WebView _fetchCustomFixedPositionLayoutRect:]):

  • WebView/WebViewData.h:

Source/WebKit/win:

  • Plugins/PluginMainThreadScheduler.cpp:

(WebCore::PluginMainThreadScheduler::scheduleCall):
(WebCore::PluginMainThreadScheduler::registerPlugin):
(WebCore::PluginMainThreadScheduler::unregisterPlugin):
(WebCore::PluginMainThreadScheduler::dispatchCallsForPlugin):

  • Plugins/PluginMainThreadScheduler.h:
  • WebIconDatabase.cpp:

(WebIconDatabase::didRemoveAllIcons):
(WebIconDatabase::didImportIconURLForPageURL):
(WebIconDatabase::deliverNotifications):

  • WebLocalizableStrings.cpp:

(mainBundleLocStrings):
(frameworkLocStringsMutex):
(findCachedString):
(cacheString):

Source/WebKit2:

  • DatabaseProcess/DatabaseProcess.cpp:

(WebKit::DatabaseProcess::postDatabaseTask):
(WebKit::DatabaseProcess::performNextDatabaseTask):

  • DatabaseProcess/DatabaseProcess.h:
  • DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:

(WebKit::UniqueIDBDatabase::shutdown):
(WebKit::UniqueIDBDatabase::postMainThreadTask):
(WebKit::UniqueIDBDatabase::performNextMainThreadTask):
(WebKit::UniqueIDBDatabase::postDatabaseTask):
(WebKit::UniqueIDBDatabase::performNextDatabaseTask):

  • DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
  • Platform/IPC/Connection.cpp:

(IPC::Connection::sendSyncMessage):
(IPC::Connection::sendSyncMessageFromSecondaryThread):
(IPC::Connection::waitForSyncReply):
(IPC::Connection::processIncomingSyncReply):
(IPC::Connection::connectionDidClose):

  • Platform/IPC/Connection.h:
  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:

(WebKit::CoordinatedGraphicsScene::appendUpdate):

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:

(WebKit::ThreadedCompositor::createCompositingThread):
(WebKit::ThreadedCompositor::runCompositingThread):
(WebKit::ThreadedCompositor::terminateCompositingThread):

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
  • Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:

(WebKit::CustomProtocolManager::addCustomProtocol):
(WebKit::CustomProtocolManager::removeCustomProtocol):
(WebKit::CustomProtocolManager::registerScheme):
(WebKit::CustomProtocolManager::unregisterScheme):
(WebKit::CustomProtocolManager::supportsScheme):
(WebKit::CustomProtocolManager::protocolForID):

  • Shared/Network/CustomProtocols/CustomProtocolManager.h:
  • Shared/linux/SeccompFilters/SeccompBroker.cpp:
  • WebProcess/Plugins/PluginProcessConnectionManager.cpp:

(WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
(WebKit::PluginProcessConnectionManager::removePluginProcessConnection):
(WebKit::PluginProcessConnectionManager::pluginProcessCrashed):

  • WebProcess/Plugins/PluginProcessConnectionManager.h:
  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::addScrollingTreeForPage):
(WebKit::EventDispatcher::removeScrollingTreeForPage):
(WebKit::EventDispatcher::wheelEvent):

  • WebProcess/WebPage/EventDispatcher.h:
  • WebProcess/soup/WebKitSoupRequestInputStream.cpp:

(webkitSoupRequestInputStreamReadAsync):
(webkitSoupRequestInputStreamAddData):

Source/WTF:

  • wtf/Atomics.cpp:

(WTF::getSwapLock):
(WTF::atomicStep):

  • wtf/MessageQueue.h:

(WTF::MessageQueue::infiniteTime):
(WTF::MessageQueue<DataType>::append):
(WTF::MessageQueue<DataType>::appendAndKill):
(WTF::MessageQueue<DataType>::appendAndCheckEmpty):
(WTF::MessageQueue<DataType>::prepend):
(WTF::MessageQueue<DataType>::removeIf):
(WTF::MessageQueue<DataType>::isEmpty):
(WTF::MessageQueue<DataType>::kill):
(WTF::MessageQueue<DataType>::killed):

  • wtf/ParallelJobsGeneric.cpp:

(WTF::ParallelEnvironment::ThreadPrivate::execute):
(WTF::ParallelEnvironment::ThreadPrivate::waitForFinish):
(WTF::ParallelEnvironment::ThreadPrivate::workerThread):

  • wtf/ParallelJobsGeneric.h:
  • wtf/RunLoop.cpp:

(WTF::RunLoop::performWork):
(WTF::RunLoop::dispatch):

  • wtf/RunLoop.h:
  • wtf/Threading.cpp:

(WTF::threadEntryPoint):
(WTF::createThread):

  • wtf/ThreadingPrimitives.h:
  • wtf/ThreadingPthreads.cpp:

(WTF::threadMapMutex):
(WTF::initializeThreading):
(WTF::identifierByPthreadHandle):
(WTF::establishIdentifierForPthreadHandle):
(WTF::changeThreadPriority):
(WTF::waitForThreadCompletion):
(WTF::detachThread):
(WTF::threadDidExit):
(WTF::currentThread):
(WTF::DeprecatedMutex::DeprecatedMutex):
(WTF::DeprecatedMutex::~DeprecatedMutex):
(WTF::DeprecatedMutex::lock):
(WTF::DeprecatedMutex::tryLock):
(WTF::DeprecatedMutex::unlock):
(WTF::ThreadCondition::~ThreadCondition):
(WTF::ThreadCondition::wait):
(WTF::ThreadCondition::timedWait):
(WTF::Mutex::Mutex): Deleted.
(WTF::Mutex::~Mutex): Deleted.
(WTF::Mutex::lock): Deleted.
(WTF::Mutex::tryLock): Deleted.
(WTF::Mutex::unlock): Deleted.

  • wtf/ThreadingWin.cpp:

(WTF::initializeCurrentThreadInternal):
(WTF::threadMapMutex):
(WTF::initializeThreading):
(WTF::storeThreadHandleByIdentifier):
(WTF::threadHandleForIdentifier):
(WTF::clearThreadHandleForIdentifier):
(WTF::currentThread):
(WTF::DeprecatedMutex::DeprecatedMutex):
(WTF::DeprecatedMutex::~DeprecatedMutex):
(WTF::DeprecatedMutex::lock):
(WTF::DeprecatedMutex::tryLock):
(WTF::DeprecatedMutex::unlock):
(WTF::ThreadCondition::~ThreadCondition):
(WTF::ThreadCondition::wait):
(WTF::ThreadCondition::timedWait):
(WTF::Mutex::Mutex): Deleted.
(WTF::Mutex::~Mutex): Deleted.
(WTF::Mutex::lock): Deleted.
(WTF::Mutex::tryLock): Deleted.
(WTF::Mutex::unlock): Deleted.

  • wtf/WorkQueue.h:
  • wtf/dtoa.cpp:
  • wtf/dtoa.h:
  • wtf/efl/DispatchQueueEfl.cpp:

(DispatchQueue::dispatch):
(DispatchQueue::performWork):
(DispatchQueue::performTimerWork):
(DispatchQueue::insertTimerWorkItem):
(DispatchQueue::wakeUpThread):
(DispatchQueue::getNextTimeOut):

  • wtf/efl/DispatchQueueEfl.h:
  • wtf/efl/RunLoopEfl.cpp:

(WTF::RunLoop::wakeUpEvent):
(WTF::RunLoop::wakeUp):

  • wtf/threads/BinarySemaphore.cpp:

(WTF::BinarySemaphore::signal):
(WTF::BinarySemaphore::wait):

  • wtf/threads/BinarySemaphore.h:
  • wtf/win/WorkQueueWin.cpp:

(WTF::WorkQueue::handleCallback):
(WTF::WorkQueue::platformInvalidate):
(WTF::WorkQueue::dispatch):
(WTF::WorkQueue::timerCallback):
(WTF::WorkQueue::dispatchAfter):

Tools:

  • DumpRenderTree/JavaScriptThreading.cpp:

(javaScriptThreadsMutex):
(runJavaScriptThread):
(startJavaScriptThreads):
(stopJavaScriptThreads):

  • TestWebKitAPI/Tests/WTF/WorkQueue.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WTF/glib/WorkQueueGLib.cpp:

(TestWebKitAPI::TEST):

Location:
trunk
Files:
130 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r187969 r187972  
     12015-08-04  Filip Pizlo  <[email protected]>
     2
     3        Rename Mutex to DeprecatedMutex
     4        https://bugs.webkit.org/show_bug.cgi?id=147675
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * bytecode/SamplingTool.cpp:
     9        (JSC::SamplingTool::doRun):
     10        (JSC::SamplingTool::notifyOfScope):
     11        * bytecode/SamplingTool.h:
     12        * dfg/DFGThreadData.h:
     13        * dfg/DFGWorklist.cpp:
     14        (JSC::DFG::Worklist::~Worklist):
     15        (JSC::DFG::Worklist::isActiveForVM):
     16        (JSC::DFG::Worklist::enqueue):
     17        (JSC::DFG::Worklist::compilationState):
     18        (JSC::DFG::Worklist::waitUntilAllPlansForVMAreReady):
     19        (JSC::DFG::Worklist::removeAllReadyPlansForVM):
     20        (JSC::DFG::Worklist::completeAllReadyPlansForVM):
     21        (JSC::DFG::Worklist::visitWeakReferences):
     22        (JSC::DFG::Worklist::removeDeadPlans):
     23        (JSC::DFG::Worklist::queueLength):
     24        (JSC::DFG::Worklist::dump):
     25        (JSC::DFG::Worklist::runThread):
     26        * dfg/DFGWorklist.h:
     27        * disassembler/Disassembler.cpp:
     28        * heap/CopiedSpace.cpp:
     29        (JSC::CopiedSpace::doneFillingBlock):
     30        (JSC::CopiedSpace::doneCopying):
     31        * heap/CopiedSpace.h:
     32        * heap/CopiedSpaceInlines.h:
     33        (JSC::CopiedSpace::recycleBorrowedBlock):
     34        (JSC::CopiedSpace::allocateBlockForCopyingPhase):
     35        * heap/HeapTimer.h:
     36        * heap/MachineStackMarker.cpp:
     37        (JSC::ActiveMachineThreadsManager::Locker::Locker):
     38        (JSC::ActiveMachineThreadsManager::add):
     39        (JSC::ActiveMachineThreadsManager::remove):
     40        (JSC::ActiveMachineThreadsManager::ActiveMachineThreadsManager):
     41        (JSC::MachineThreads::~MachineThreads):
     42        (JSC::MachineThreads::addCurrentThread):
     43        (JSC::MachineThreads::removeThreadIfFound):
     44        (JSC::MachineThreads::tryCopyOtherThreadStack):
     45        (JSC::MachineThreads::tryCopyOtherThreadStacks):
     46        (JSC::MachineThreads::gatherConservativeRoots):
     47        * heap/MachineStackMarker.h:
     48        * interpreter/JSStack.cpp:
     49        (JSC::stackStatisticsMutex):
     50        (JSC::JSStack::addToCommittedByteCount):
     51        (JSC::JSStack::committedByteCount):
     52        * jit/JITThunks.h:
     53        * profiler/ProfilerDatabase.h:
     54
    1552015-08-05  Saam barati  <[email protected]>
    256
  • trunk/Source/JavaScriptCore/bytecode/SamplingTool.cpp

    r165676 r187972  
    286286#if ENABLE(CODEBLOCK_SAMPLING)
    287287    if (CodeBlock* codeBlock = sample.codeBlock()) {
    288         MutexLocker locker(m_scriptSampleMapMutex);
     288        DeprecatedMutexLocker locker(m_scriptSampleMapMutex);
    289289        ScriptSampleRecord* record = m_scopeSampleMap->get(codeBlock->ownerExecutable());
    290290        ASSERT(record);
     
    302302{
    303303#if ENABLE(CODEBLOCK_SAMPLING)
    304     MutexLocker locker(m_scriptSampleMapMutex);
     304    DeprecatedMutexLocker locker(m_scriptSampleMapMutex);
    305305    m_scopeSampleMap->set(script, adoptPtr(new ScriptSampleRecord(vm, script)));
    306306#else
  • trunk/Source/JavaScriptCore/bytecode/SamplingTool.h

    r187587 r187972  
    339339       
    340340#if ENABLE(CODEBLOCK_SAMPLING)
    341         Mutex m_scriptSampleMapMutex;
     341        DeprecatedMutex m_scriptSampleMapMutex;
    342342        std::unique_ptr<ScriptSampleRecordMap> m_scopeSampleMap;
    343343#endif
  • trunk/Source/JavaScriptCore/dfg/DFGThreadData.h

    r187587 r187972  
    4949    Worklist* m_worklist;
    5050    ThreadIdentifier m_identifier;
    51     Mutex m_rightToRun;
     51    DeprecatedMutex m_rightToRun;
    5252    Safepoint* m_safepoint;
    5353};
  • trunk/Source/JavaScriptCore/dfg/DFGWorklist.cpp

    r185346 r187972  
    4747{
    4848    {
    49         MutexLocker locker(m_lock);
     49        DeprecatedMutexLocker locker(m_lock);
    5050        for (unsigned i = m_threads.size(); i--;)
    5151            m_queue.append(nullptr); // Use null plan to indicate that we want the thread to terminate.
     
    7878bool Worklist::isActiveForVM(VM& vm) const
    7979{
    80     MutexLocker locker(m_lock);
     80    DeprecatedMutexLocker locker(m_lock);
    8181    PlanMap::const_iterator end = m_plans.end();
    8282    for (PlanMap::const_iterator iter = m_plans.begin(); iter != end; ++iter) {
     
    9090{
    9191    RefPtr<Plan> plan = passedPlan;
    92     MutexLocker locker(m_lock);
     92    DeprecatedMutexLocker locker(m_lock);
    9393    if (Options::verboseCompilationQueue()) {
    9494        dump(locker, WTF::dataFile());
     
    103103Worklist::State Worklist::compilationState(CompilationKey key)
    104104{
    105     MutexLocker locker(m_lock);
     105    DeprecatedMutexLocker locker(m_lock);
    106106    PlanMap::iterator iter = m_plans.find(key);
    107107    if (iter == m_plans.end())
     
    119119    // be adding plans, our VM will not be.
    120120   
    121     MutexLocker locker(m_lock);
     121    DeprecatedMutexLocker locker(m_lock);
    122122   
    123123    if (Options::verboseCompilationQueue()) {
     
    148148{
    149149    DeferGC deferGC(vm.heap);
    150     MutexLocker locker(m_lock);
     150    DeprecatedMutexLocker locker(m_lock);
    151151    for (size_t i = 0; i < m_readyPlans.size(); ++i) {
    152152        RefPtr<Plan> plan = m_readyPlans[i];
     
    193193   
    194194    if (!!requestedKey && resultingState == NotKnown) {
    195         MutexLocker locker(m_lock);
     195        DeprecatedMutexLocker locker(m_lock);
    196196        if (m_plans.contains(requestedKey))
    197197            resultingState = Compiling;
     
    226226    VM* vm = visitor.heap()->vm();
    227227    {
    228         MutexLocker locker(m_lock);
     228        DeprecatedMutexLocker locker(m_lock);
    229229        for (PlanMap::iterator iter = m_plans.begin(); iter != m_plans.end(); ++iter) {
    230230            Plan* plan = iter->value.get();
     
    249249{
    250250    {
    251         MutexLocker locker(m_lock);
     251        DeprecatedMutexLocker locker(m_lock);
    252252        HashSet<CompilationKey> deadPlanKeys;
    253253        for (PlanMap::iterator iter = m_plans.begin(); iter != m_plans.end(); ++iter) {
     
    296296size_t Worklist::queueLength()
    297297{
    298     MutexLocker locker(m_lock);
     298    DeprecatedMutexLocker locker(m_lock);
    299299    return m_queue.size();
    300300}
     
    302302void Worklist::dump(PrintStream& out) const
    303303{
    304     MutexLocker locker(m_lock);
     304    DeprecatedMutexLocker locker(m_lock);
    305305    dump(locker, out);
    306306}
    307307
    308 void Worklist::dump(const MutexLocker&, PrintStream& out) const
     308void Worklist::dump(const DeprecatedMutexLocker&, PrintStream& out) const
    309309{
    310310    out.print(
     
    326326        RefPtr<Plan> plan;
    327327        {
    328             MutexLocker locker(m_lock);
     328            DeprecatedMutexLocker locker(m_lock);
    329329            while (m_queue.isEmpty())
    330330                m_planEnqueued.wait(m_lock);
     
    342342       
    343343        {
    344             MutexLocker locker(data->m_rightToRun);
     344            DeprecatedMutexLocker locker(data->m_rightToRun);
    345345            {
    346                 MutexLocker locker(m_lock);
     346                DeprecatedMutexLocker locker(m_lock);
    347347                if (plan->stage == Plan::Cancelled) {
    348348                    m_numberOfActiveThreads--;
     
    360360           
    361361            {
    362                 MutexLocker locker(m_lock);
     362                DeprecatedMutexLocker locker(m_lock);
    363363                if (plan->stage == Plan::Cancelled) {
    364364                    m_numberOfActiveThreads--;
     
    371371
    372372        {
    373             MutexLocker locker(m_lock);
     373            DeprecatedMutexLocker locker(m_lock);
    374374           
    375375            // We could have been cancelled between releasing rightToRun and acquiring m_lock.
  • trunk/Source/JavaScriptCore/dfg/DFGWorklist.h

    r185346 r187972  
    8686    void removeAllReadyPlansForVM(VM&, Vector<RefPtr<Plan>, 8>&);
    8787
    88     void dump(const MutexLocker&, PrintStream&) const;
     88    void dump(const DeprecatedMutexLocker&, PrintStream&) const;
    8989   
    9090    CString m_threadName;
     
    104104    Vector<RefPtr<Plan>, 16> m_readyPlans;
    105105
    106     Mutex m_suspensionLock;
     106    DeprecatedMutex m_suspensionLock;
    107107   
    108     mutable Mutex m_lock;
     108    mutable DeprecatedMutex m_lock;
    109109    ThreadCondition m_planEnqueued;
    110110    ThreadCondition m_planCompiled;
  • trunk/Source/JavaScriptCore/disassembler/Disassembler.cpp

    r181887 r187972  
    7979    void enqueue(std::unique_ptr<DisassemblyTask> task)
    8080    {
    81         MutexLocker locker(m_lock);
     81        DeprecatedMutexLocker locker(m_lock);
    8282        m_queue.append(WTF::move(task));
    8383        m_condition.broadcast();
     
    8686    void waitUntilEmpty()
    8787    {
    88         MutexLocker locker(m_lock);
     88        DeprecatedMutexLocker locker(m_lock);
    8989        while (!m_queue.isEmpty() || m_working)
    9090            m_condition.wait(m_lock);
     
    9797            std::unique_ptr<DisassemblyTask> task;
    9898            {
    99                 MutexLocker locker(m_lock);
     99                DeprecatedMutexLocker locker(m_lock);
    100100                m_working = false;
    101101                m_condition.broadcast();
     
    113113    }
    114114   
    115     Mutex m_lock;
     115    DeprecatedMutex m_lock;
    116116    ThreadCondition m_condition;
    117117    Deque<std::unique_ptr<DisassemblyTask>> m_queue;
  • trunk/Source/JavaScriptCore/heap/CopiedSpace.cpp

    r183974 r187972  
    199199
    200200    {
    201         MutexLocker locker(m_loanedBlocksLock);
     201        DeprecatedMutexLocker locker(m_loanedBlocksLock);
    202202        ASSERT(m_numberOfLoanedBlocks > 0);
    203203        ASSERT(m_inCopyingPhase);
     
    232232{
    233233    {
    234         MutexLocker locker(m_loanedBlocksLock);
     234        DeprecatedMutexLocker locker(m_loanedBlocksLock);
    235235        while (m_numberOfLoanedBlocks > 0)
    236236            m_loanedBlocksCondition.wait(m_loanedBlocksLock);
  • trunk/Source/JavaScriptCore/heap/CopiedSpace.h

    r186397 r187972  
    139139    bool m_shouldDoCopyPhase;
    140140
    141     Mutex m_loanedBlocksLock;
     141    DeprecatedMutex m_loanedBlocksLock;
    142142    ThreadCondition m_loanedBlocksCondition;
    143143    size_t m_numberOfLoanedBlocks;
  • trunk/Source/JavaScriptCore/heap/CopiedSpaceInlines.h

    r186397 r187972  
    114114
    115115    {
    116         MutexLocker locker(m_loanedBlocksLock);
     116        DeprecatedMutexLocker locker(m_loanedBlocksLock);
    117117        ASSERT(m_numberOfLoanedBlocks > 0);
    118118        ASSERT(m_inCopyingPhase);
     
    129129
    130130    {
    131         MutexLocker locker(m_loanedBlocksLock);
     131        DeprecatedMutexLocker locker(m_loanedBlocksLock);
    132132        m_numberOfLoanedBlocks++;
    133133    }
  • trunk/Source/JavaScriptCore/heap/HeapTimer.h

    r166149 r187972  
    6060    CFRunLoopTimerContext m_context;
    6161
    62     Mutex m_shutdownMutex;
     62    DeprecatedMutex m_shutdownMutex;
    6363#elif PLATFORM(EFL)
    6464    static bool timerEvent(void*);
  • trunk/Source/JavaScriptCore/heap/MachineStackMarker.cpp

    r187026 r187972  
    104104
    105105    private:
    106         MutexLocker m_locker;
     106        DeprecatedMutexLocker m_locker;
    107107    };
    108108
    109109    void add(MachineThreads* machineThreads)
    110110    {
    111         MutexLocker managerLock(m_lock);
     111        DeprecatedMutexLocker managerLock(m_lock);
    112112        m_set.add(machineThreads);
    113113    }
     
    115115    void remove(MachineThreads* machineThreads)
    116116    {
    117         MutexLocker managerLock(m_lock);
     117        DeprecatedMutexLocker managerLock(m_lock);
    118118        auto recordedMachineThreads = m_set.take(machineThreads);
    119119        RELEASE_ASSERT(recordedMachineThreads = machineThreads);
     
    130130    ActiveMachineThreadsManager() { }
    131131   
    132     Mutex m_lock;
     132    DeprecatedMutex m_lock;
    133133    MachineThreadsSet m_set;
    134134
     
    264264    threadSpecificKeyDelete(m_threadSpecific);
    265265
    266     MutexLocker registeredThreadsLock(m_registeredThreadsMutex);
     266    DeprecatedMutexLocker registeredThreadsLock(m_registeredThreadsMutex);
    267267    for (Thread* t = m_registeredThreads; t;) {
    268268        Thread* next = t->next;
     
    295295    Thread* thread = Thread::createForCurrentThread();
    296296
    297     MutexLocker lock(m_registeredThreadsMutex);
     297    DeprecatedMutexLocker lock(m_registeredThreadsMutex);
    298298
    299299    thread->next = m_registeredThreads;
     
    319319void MachineThreads::removeThreadIfFound(PlatformThread platformThread)
    320320{
    321     MutexLocker lock(m_registeredThreadsMutex);
     321    DeprecatedMutexLocker lock(m_registeredThreadsMutex);
    322322    Thread* t = m_registeredThreads;
    323323    if (*t == platformThread) {
     
    565565}
    566566
    567 bool MachineThreads::tryCopyOtherThreadStacks(MutexLocker&, void* buffer, size_t capacity, size_t* size)
     567bool MachineThreads::tryCopyOtherThreadStacks(DeprecatedMutexLocker&, void* buffer, size_t capacity, size_t* size)
    568568{
    569569    // Prevent two VMs from suspending each other's threads at the same time,
     
    659659    size_t capacity = 0;
    660660    void* buffer = nullptr;
    661     MutexLocker lock(m_registeredThreadsMutex);
     661    DeprecatedMutexLocker lock(m_registeredThreadsMutex);
    662662    while (!tryCopyOtherThreadStacks(lock, buffer, capacity, &size))
    663663        growBuffer(size, &buffer, &capacity);
  • trunk/Source/JavaScriptCore/heap/MachineStackMarker.h

    r187819 r187972  
    5353
    5454        void tryCopyOtherThreadStack(Thread*, void*, size_t capacity, size_t*);
    55         bool tryCopyOtherThreadStacks(MutexLocker&, void*, size_t capacity, size_t*);
     55        bool tryCopyOtherThreadStacks(DeprecatedMutexLocker&, void*, size_t capacity, size_t*);
    5656
    5757        static void removeThread(void*);
     
    6060        void removeThreadIfFound(PlatformThread);
    6161
    62         Mutex m_registeredThreadsMutex;
     62        DeprecatedMutex m_registeredThreadsMutex;
    6363        Thread* m_registeredThreads;
    6464        WTF::ThreadSpecificKey m_threadSpecific;
  • trunk/Source/JavaScriptCore/interpreter/JSStack.cpp

    r182364 r187972  
    4040static size_t committedBytesCount = 0;
    4141
    42 static Mutex& stackStatisticsMutex()
     42static DeprecatedMutex& stackStatisticsMutex()
    4343{
    44     DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, staticMutex, ());
     44    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, staticMutex, ());
    4545    return staticMutex;
    4646}   
     
    147147void JSStack::addToCommittedByteCount(long byteCount)
    148148{
    149     MutexLocker locker(stackStatisticsMutex());
     149    DeprecatedMutexLocker locker(stackStatisticsMutex());
    150150    ASSERT(static_cast<long>(committedBytesCount) + byteCount > -1);
    151151    committedBytesCount += byteCount;
     
    177177{
    178178#if !ENABLE(JIT)
    179     MutexLocker locker(stackStatisticsMutex());
     179    DeprecatedMutexLocker locker(stackStatisticsMutex());
    180180    return committedBytesCount;
    181181#else
  • trunk/Source/JavaScriptCore/jit/JITThunks.h

    r182068 r187972  
    6565private:
    6666    // Main thread can hold this lock for a while, so use an adaptive mutex.
    67     typedef Mutex Lock;
    68     typedef MutexLocker Locker;
     67    typedef DeprecatedMutex Lock;
     68    typedef DeprecatedMutexLocker Locker;
    6969
    7070    void finalize(Handle<Unknown>, void* context) override;
  • trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.h

    r157653 r187972  
    8282    //   power-aware backoff. An adaptive mutex will do this as a matter of course,
    8383    //   but a spinlock won't.
    84     typedef Mutex Lock;
    85     typedef MutexLocker Locker;
     84    typedef DeprecatedMutex Lock;
     85    typedef DeprecatedMutexLocker Locker;
    8686   
    8787
  • trunk/Source/WTF/ChangeLog

    r187918 r187972  
     12015-08-04  Filip Pizlo  <[email protected]>
     2
     3        Rename Mutex to DeprecatedMutex
     4        https://bugs.webkit.org/show_bug.cgi?id=147675
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * wtf/Atomics.cpp:
     9        (WTF::getSwapLock):
     10        (WTF::atomicStep):
     11        * wtf/MessageQueue.h:
     12        (WTF::MessageQueue::infiniteTime):
     13        (WTF::MessageQueue<DataType>::append):
     14        (WTF::MessageQueue<DataType>::appendAndKill):
     15        (WTF::MessageQueue<DataType>::appendAndCheckEmpty):
     16        (WTF::MessageQueue<DataType>::prepend):
     17        (WTF::MessageQueue<DataType>::removeIf):
     18        (WTF::MessageQueue<DataType>::isEmpty):
     19        (WTF::MessageQueue<DataType>::kill):
     20        (WTF::MessageQueue<DataType>::killed):
     21        * wtf/ParallelJobsGeneric.cpp:
     22        (WTF::ParallelEnvironment::ThreadPrivate::execute):
     23        (WTF::ParallelEnvironment::ThreadPrivate::waitForFinish):
     24        (WTF::ParallelEnvironment::ThreadPrivate::workerThread):
     25        * wtf/ParallelJobsGeneric.h:
     26        * wtf/RunLoop.cpp:
     27        (WTF::RunLoop::performWork):
     28        (WTF::RunLoop::dispatch):
     29        * wtf/RunLoop.h:
     30        * wtf/Threading.cpp:
     31        (WTF::threadEntryPoint):
     32        (WTF::createThread):
     33        * wtf/ThreadingPrimitives.h:
     34        * wtf/ThreadingPthreads.cpp:
     35        (WTF::threadMapMutex):
     36        (WTF::initializeThreading):
     37        (WTF::identifierByPthreadHandle):
     38        (WTF::establishIdentifierForPthreadHandle):
     39        (WTF::changeThreadPriority):
     40        (WTF::waitForThreadCompletion):
     41        (WTF::detachThread):
     42        (WTF::threadDidExit):
     43        (WTF::currentThread):
     44        (WTF::DeprecatedMutex::DeprecatedMutex):
     45        (WTF::DeprecatedMutex::~DeprecatedMutex):
     46        (WTF::DeprecatedMutex::lock):
     47        (WTF::DeprecatedMutex::tryLock):
     48        (WTF::DeprecatedMutex::unlock):
     49        (WTF::ThreadCondition::~ThreadCondition):
     50        (WTF::ThreadCondition::wait):
     51        (WTF::ThreadCondition::timedWait):
     52        (WTF::Mutex::Mutex): Deleted.
     53        (WTF::Mutex::~Mutex): Deleted.
     54        (WTF::Mutex::lock): Deleted.
     55        (WTF::Mutex::tryLock): Deleted.
     56        (WTF::Mutex::unlock): Deleted.
     57        * wtf/ThreadingWin.cpp:
     58        (WTF::initializeCurrentThreadInternal):
     59        (WTF::threadMapMutex):
     60        (WTF::initializeThreading):
     61        (WTF::storeThreadHandleByIdentifier):
     62        (WTF::threadHandleForIdentifier):
     63        (WTF::clearThreadHandleForIdentifier):
     64        (WTF::currentThread):
     65        (WTF::DeprecatedMutex::DeprecatedMutex):
     66        (WTF::DeprecatedMutex::~DeprecatedMutex):
     67        (WTF::DeprecatedMutex::lock):
     68        (WTF::DeprecatedMutex::tryLock):
     69        (WTF::DeprecatedMutex::unlock):
     70        (WTF::ThreadCondition::~ThreadCondition):
     71        (WTF::ThreadCondition::wait):
     72        (WTF::ThreadCondition::timedWait):
     73        (WTF::Mutex::Mutex): Deleted.
     74        (WTF::Mutex::~Mutex): Deleted.
     75        (WTF::Mutex::lock): Deleted.
     76        (WTF::Mutex::tryLock): Deleted.
     77        (WTF::Mutex::unlock): Deleted.
     78        * wtf/WorkQueue.h:
     79        * wtf/dtoa.cpp:
     80        * wtf/dtoa.h:
     81        * wtf/efl/DispatchQueueEfl.cpp:
     82        (DispatchQueue::dispatch):
     83        (DispatchQueue::performWork):
     84        (DispatchQueue::performTimerWork):
     85        (DispatchQueue::insertTimerWorkItem):
     86        (DispatchQueue::wakeUpThread):
     87        (DispatchQueue::getNextTimeOut):
     88        * wtf/efl/DispatchQueueEfl.h:
     89        * wtf/efl/RunLoopEfl.cpp:
     90        (WTF::RunLoop::wakeUpEvent):
     91        (WTF::RunLoop::wakeUp):
     92        * wtf/threads/BinarySemaphore.cpp:
     93        (WTF::BinarySemaphore::signal):
     94        (WTF::BinarySemaphore::wait):
     95        * wtf/threads/BinarySemaphore.h:
     96        * wtf/win/WorkQueueWin.cpp:
     97        (WTF::WorkQueue::handleCallback):
     98        (WTF::WorkQueue::platformInvalidate):
     99        (WTF::WorkQueue::dispatch):
     100        (WTF::WorkQueue::timerCallback):
     101        (WTF::WorkQueue::dispatchAfter):
     102
    11032015-08-04  Alex Christensen  <[email protected]>
    2104
  • trunk/Source/WTF/wtf/Atomics.cpp

    r187819 r187972  
    7373
    7474static const size_t kSwapLockCount = 32;
    75 static Mutex s_swapLocks[kSwapLockCount];
     75static DeprecatedMutex s_swapLocks[kSwapLockCount];
    7676
    77 static inline Mutex& getSwapLock(const volatile int64_t* addr)
     77static inline DeprecatedMutex& getSwapLock(const volatile int64_t* addr)
    7878{
    7979    return s_swapLocks[(reinterpret_cast<intptr_t>(addr) >> 3U) % kSwapLockCount];
     
    8282static int64_t atomicStep(int64_t volatile* addend, int64_t step)
    8383{
    84     Mutex& mutex = getSwapLock(addend);
     84    DeprecatedMutex& mutex = getSwapLock(addend);
    8585
    8686    mutex.lock();
  • trunk/Source/WTF/wtf/MessageQueue.h

    r170774 r187972  
    7878
    7979    private:
    80         mutable Mutex m_mutex;
     80        mutable DeprecatedMutex m_mutex;
    8181        ThreadCondition m_condition;
    8282        Deque<std::unique_ptr<DataType>> m_queue;
     
    9292    inline void MessageQueue<DataType>::append(std::unique_ptr<DataType> message)
    9393    {
    94         MutexLocker lock(m_mutex);
     94        DeprecatedMutexLocker lock(m_mutex);
    9595        m_queue.append(WTF::move(message));
    9696        m_condition.signal();
     
    100100    inline void MessageQueue<DataType>::appendAndKill(std::unique_ptr<DataType> message)
    101101    {
    102         MutexLocker lock(m_mutex);
     102        DeprecatedMutexLocker lock(m_mutex);
    103103        m_queue.append(WTF::move(message));
    104104        m_killed = true;
     
    110110    inline bool MessageQueue<DataType>::appendAndCheckEmpty(std::unique_ptr<DataType> message)
    111111    {
    112         MutexLocker lock(m_mutex);
     112        DeprecatedMutexLocker lock(m_mutex);
    113113        bool wasEmpty = m_queue.isEmpty();
    114114        m_queue.append(WTF::move(message));
     
    120120    inline void MessageQueue<DataType>::prepend(std::unique_ptr<DataType> message)
    121121    {
    122         MutexLocker lock(m_mutex);
     122        DeprecatedMutexLocker lock(m_mutex);
    123123        m_queue.prepend(WTF::move(message));
    124124        m_condition.signal();
     
    138138    inline auto MessageQueue<DataType>::waitForMessageFilteredWithTimeout(MessageQueueWaitResult& result, Predicate&& predicate, double absoluteTime) -> std::unique_ptr<DataType>
    139139    {
    140         MutexLocker lock(m_mutex);
     140        DeprecatedMutexLocker lock(m_mutex);
    141141        bool timedOut = false;
    142142
     
    175175    inline auto MessageQueue<DataType>::tryGetMessage() -> std::unique_ptr<DataType>
    176176    {
    177         MutexLocker lock(m_mutex);
     177        DeprecatedMutexLocker lock(m_mutex);
    178178        if (m_killed)
    179179            return nullptr;
     
    187187    inline auto MessageQueue<DataType>::tryGetMessageIgnoringKilled() -> std::unique_ptr<DataType>
    188188    {
    189         MutexLocker lock(m_mutex);
     189        DeprecatedMutexLocker lock(m_mutex);
    190190        if (m_queue.isEmpty())
    191191            return nullptr;
     
    198198    inline void MessageQueue<DataType>::removeIf(Predicate&& predicate)
    199199    {
    200         MutexLocker lock(m_mutex);
     200        DeprecatedMutexLocker lock(m_mutex);
    201201        while (true) {
    202202            auto found = m_queue.findIf([&predicate](const std::unique_ptr<DataType>& ptr) -> bool {
     
    215215    inline bool MessageQueue<DataType>::isEmpty()
    216216    {
    217         MutexLocker lock(m_mutex);
     217        DeprecatedMutexLocker lock(m_mutex);
    218218        if (m_killed)
    219219            return true;
     
    224224    inline void MessageQueue<DataType>::kill()
    225225    {
    226         MutexLocker lock(m_mutex);
     226        DeprecatedMutexLocker lock(m_mutex);
    227227        m_killed = true;
    228228        m_condition.broadcast();
     
    232232    inline bool MessageQueue<DataType>::killed() const
    233233    {
    234         MutexLocker lock(m_mutex);
     234        DeprecatedMutexLocker lock(m_mutex);
    235235        return m_killed;
    236236    }
  • trunk/Source/WTF/wtf/ParallelJobsGeneric.cpp

    r111778 r187972  
    106106void ParallelEnvironment::ThreadPrivate::execute(ThreadFunction threadFunction, void* parameters)
    107107{
    108     MutexLocker lock(m_mutex);
     108    DeprecatedMutexLocker lock(m_mutex);
    109109
    110110    m_threadFunction = threadFunction;
     
    116116void ParallelEnvironment::ThreadPrivate::waitForFinish()
    117117{
    118     MutexLocker lock(m_mutex);
     118    DeprecatedMutexLocker lock(m_mutex);
    119119
    120120    while (m_running)
     
    125125{
    126126    ThreadPrivate* sharedThread = reinterpret_cast<ThreadPrivate*>(threadData);
    127     MutexLocker lock(sharedThread->m_mutex);
     127    DeprecatedMutexLocker lock(sharedThread->m_mutex);
    128128
    129129    while (sharedThread->m_threadID) {
  • trunk/Source/WTF/wtf/ParallelJobsGeneric.h

    r112560 r187972  
    7777        ParallelEnvironment* m_parent;
    7878
    79         mutable Mutex m_mutex;
     79        mutable DeprecatedMutex m_mutex;
    8080        ThreadCondition m_threadCondition;
    8181
  • trunk/Source/WTF/wtf/RunLoop.cpp

    r186006 r187972  
    9393        std::function<void()> function;
    9494        {
    95             MutexLocker locker(m_functionQueueLock);
     95            DeprecatedMutexLocker locker(m_functionQueueLock);
    9696            functionsToHandle = m_functionQueue.size();
    9797
     
    108108        std::function<void()> function;
    109109        {
    110             MutexLocker locker(m_functionQueueLock);
     110            DeprecatedMutexLocker locker(m_functionQueueLock);
    111111
    112112            // Even if we start off with N functions to handle and we've only handled less than N functions, the queue
     
    126126{
    127127    {
    128         MutexLocker locker(m_functionQueueLock);
     128        DeprecatedMutexLocker locker(m_functionQueueLock);
    129129        m_functionQueue.append(WTF::move(function));
    130130    }
  • trunk/Source/WTF/wtf/RunLoop.h

    r185502 r187972  
    131131    void performWork();
    132132
    133     Mutex m_functionQueueLock;
     133    DeprecatedMutex m_functionQueueLock;
    134134    Deque<std::function<void ()>> m_functionQueue;
    135135
     
    148148    int m_nestingLevel;
    149149#elif PLATFORM(EFL)
    150     Mutex m_pipeLock;
     150    DeprecatedMutex m_pipeLock;
    151151    EflUniquePtr<Ecore_Pipe> m_pipe;
    152152
    153     Mutex m_wakeUpEventRequestedLock;
     153    DeprecatedMutex m_wakeUpEventRequestedLock;
    154154    bool m_wakeUpEventRequested;
    155155
  • trunk/Source/WTF/wtf/Threading.cpp

    r175782 r187972  
    3636    const char* name;
    3737    std::function<void()> entryPoint;
    38     Mutex creationMutex;
     38    DeprecatedMutex creationMutex;
    3939};
    4040
     
    4646    // establishing ThreadIdentifier.
    4747    {
    48         MutexLocker locker(context->creationMutex);
     48        DeprecatedMutexLocker locker(context->creationMutex);
    4949    }
    5050
     
    7171
    7272    // Prevent the thread body from executing until we've established the thread identifier.
    73     MutexLocker locker(context->creationMutex);
     73    DeprecatedMutexLocker locker(context->creationMutex);
    7474
    7575    return createThreadInternal(threadEntryPoint, context, name);
  • trunk/Source/WTF/wtf/ThreadingPrimitives.h

    r165676 r187972  
    7171#endif
    7272   
    73 class Mutex {
    74     WTF_MAKE_NONCOPYABLE(Mutex); WTF_MAKE_FAST_ALLOCATED;
     73class DeprecatedMutex {
     74    WTF_MAKE_NONCOPYABLE(DeprecatedMutex); WTF_MAKE_FAST_ALLOCATED;
    7575public:
    76     WTF_EXPORT_PRIVATE Mutex();
    77     WTF_EXPORT_PRIVATE ~Mutex();
     76    WTF_EXPORT_PRIVATE DeprecatedMutex();
     77    WTF_EXPORT_PRIVATE ~DeprecatedMutex();
    7878
    7979    WTF_EXPORT_PRIVATE void lock();
     
    8787};
    8888
    89 typedef Locker<Mutex> MutexLocker;
     89typedef Locker<DeprecatedMutex> DeprecatedMutexLocker;
    9090
    9191class ThreadCondition {
     
    9595    WTF_EXPORT_PRIVATE ~ThreadCondition();
    9696   
    97     WTF_EXPORT_PRIVATE void wait(Mutex& mutex);
     97    WTF_EXPORT_PRIVATE void wait(DeprecatedMutex&);
    9898    // Returns true if the condition was signaled before absoluteTime, false if the absoluteTime was reached or is in the past.
    9999    // The absoluteTime is in seconds, starting on January 1, 1970. The time is assumed to use the same time zone as WTF::currentTime().
    100     WTF_EXPORT_PRIVATE bool timedWait(Mutex&, double absoluteTime);
     100    WTF_EXPORT_PRIVATE bool timedWait(DeprecatedMutex&, double absoluteTime);
    101101    WTF_EXPORT_PRIVATE void signal();
    102102    WTF_EXPORT_PRIVATE void broadcast();
     
    114114} // namespace WTF
    115115
    116 using WTF::Mutex;
    117 using WTF::MutexLocker;
     116using WTF::DeprecatedMutex;
     117using WTF::DeprecatedMutexLocker;
    118118using WTF::ThreadCondition;
    119119
  • trunk/Source/WTF/wtf/ThreadingPthreads.cpp

    r177023 r187972  
    103103void threadWasJoined(ThreadIdentifier);
    104104
    105 static Mutex& threadMapMutex()
    106 {
    107     DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, mutex, ());
     105static DeprecatedMutex& threadMapMutex()
     106{
     107    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, mutex, ());
    108108    return mutex;
    109109}
     
    127127    StackStats::initialize();
    128128    wtfThreadData();
    129     s_dtoaP5Mutex = new Mutex;
     129    s_dtoaP5Mutex = new DeprecatedMutex;
    130130    initializeDates();
    131131}
     
    139139static ThreadIdentifier identifierByPthreadHandle(const pthread_t& pthreadHandle)
    140140{
    141     MutexLocker locker(threadMapMutex());
     141    DeprecatedMutexLocker locker(threadMapMutex());
    142142
    143143    ThreadMap::iterator i = threadMap().begin();
     
    153153{
    154154    ASSERT(!identifierByPthreadHandle(pthreadHandle));
    155     MutexLocker locker(threadMapMutex());
     155    DeprecatedMutexLocker locker(threadMapMutex());
    156156    static ThreadIdentifier identifierCount = 1;
    157157    threadMap().add(identifierCount, std::make_unique<PthreadState>(pthreadHandle));
     
    220220
    221221    {
    222         MutexLocker locker(threadMapMutex());
     222        DeprecatedMutexLocker locker(threadMapMutex());
    223223        pthreadHandle = pthreadHandleForIdentifierWithLockAlreadyHeld(threadID);
    224224        ASSERT(pthreadHandle);
     
    243243    {
    244244        // We don't want to lock across the call to join, since that can block our thread and cause deadlock.
    245         MutexLocker locker(threadMapMutex());
     245        DeprecatedMutexLocker locker(threadMapMutex());
    246246        pthreadHandle = pthreadHandleForIdentifierWithLockAlreadyHeld(threadID);
    247247        ASSERT(pthreadHandle);
     
    255255        LOG_ERROR("ThreadIdentifier %u was unable to be joined.\n", threadID);
    256256
    257     MutexLocker locker(threadMapMutex());
     257    DeprecatedMutexLocker locker(threadMapMutex());
    258258    PthreadState* state = threadMap().get(threadID);
    259259    ASSERT(state);
     
    274274    ASSERT(threadID);
    275275
    276     MutexLocker locker(threadMapMutex());
     276    DeprecatedMutexLocker locker(threadMapMutex());
    277277    pthread_t pthreadHandle = pthreadHandleForIdentifierWithLockAlreadyHeld(threadID);
    278278    ASSERT(pthreadHandle);
     
    292292void threadDidExit(ThreadIdentifier threadID)
    293293{
    294     MutexLocker locker(threadMapMutex());
     294    DeprecatedMutexLocker locker(threadMapMutex());
    295295    PthreadState* state = threadMap().get(threadID);
    296296    ASSERT(state);
     
    314314}
    315315
    316 Mutex::Mutex()
     316DeprecatedMutex::DeprecatedMutex()
    317317{
    318318    pthread_mutexattr_t attr;
     
    326326}
    327327
    328 Mutex::~Mutex()
     328DeprecatedMutex::~DeprecatedMutex()
    329329{
    330330    int result = pthread_mutex_destroy(&m_mutex);
     
    332332}
    333333
    334 void Mutex::lock()
     334void DeprecatedMutex::lock()
    335335{
    336336    int result = pthread_mutex_lock(&m_mutex);
     
    338338}
    339339
    340 bool Mutex::tryLock()
     340bool DeprecatedMutex::tryLock()
    341341{
    342342    int result = pthread_mutex_trylock(&m_mutex);
     
    351351}
    352352
    353 void Mutex::unlock()
     353void DeprecatedMutex::unlock()
    354354{
    355355    int result = pthread_mutex_unlock(&m_mutex);
     
    367367}
    368368   
    369 void ThreadCondition::wait(Mutex& mutex)
     369void ThreadCondition::wait(DeprecatedMutex& mutex)
    370370{
    371371    int result = pthread_cond_wait(&m_condition, &mutex.impl());
     
    373373}
    374374
    375 bool ThreadCondition::timedWait(Mutex& mutex, double absoluteTime)
     375bool ThreadCondition::timedWait(DeprecatedMutex& mutex, double absoluteTime)
    376376{
    377377    if (absoluteTime < currentTime())
  • trunk/Source/WTF/wtf/ThreadingWin.cpp

    r183063 r187972  
    144144}
    145145
    146 static Mutex& threadMapMutex()
    147 {
    148     static Mutex mutex;
     146static DeprecatedMutex& threadMapMutex()
     147{
     148    static DeprecatedMutex mutex;
    149149    return mutex;
    150150}
     
    166166    initializeRandomNumberGenerator();
    167167    wtfThreadData();
    168     s_dtoaP5Mutex = new Mutex;
     168    s_dtoaP5Mutex = new DeprecatedMutex;
    169169    initializeDates();
    170170}
     
    178178static void storeThreadHandleByIdentifier(DWORD threadID, HANDLE threadHandle)
    179179{
    180     MutexLocker locker(threadMapMutex());
     180    DeprecatedMutexLocker locker(threadMapMutex());
    181181    ASSERT(!threadMap().contains(threadID));
    182182    threadMap().add(threadID, threadHandle);
     
    185185static HANDLE threadHandleForIdentifier(ThreadIdentifier id)
    186186{
    187     MutexLocker locker(threadMapMutex());
     187    DeprecatedMutexLocker locker(threadMapMutex());
    188188    return threadMap().get(id);
    189189}
     
    191191static void clearThreadHandleForIdentifier(ThreadIdentifier id)
    192192{
    193     MutexLocker locker(threadMapMutex());
     193    DeprecatedMutexLocker locker(threadMapMutex());
    194194    ASSERT(threadMap().contains(id));
    195195    threadMap().remove(id);
     
    278278}
    279279
    280 Mutex::Mutex()
     280DeprecatedMutex::DeprecatedMutex()
    281281{
    282282    m_mutex.m_recursionCount = 0;
     
    284284}
    285285
    286 Mutex::~Mutex()
     286DeprecatedMutex::~DeprecatedMutex()
    287287{
    288288    DeleteCriticalSection(&m_mutex.m_internalMutex);
    289289}
    290290
    291 void Mutex::lock()
     291void DeprecatedMutex::lock()
    292292{
    293293    EnterCriticalSection(&m_mutex.m_internalMutex);
     
    296296   
    297297#pragma warning(suppress: 26115)
    298 bool Mutex::tryLock()
     298bool DeprecatedMutex::tryLock()
    299299{
    300300    // This method is modeled after the behavior of pthread_mutex_trylock,
     
    322322}
    323323
    324 void Mutex::unlock()
     324void DeprecatedMutex::unlock()
    325325{
    326326    ASSERT(m_mutex.m_recursionCount);
     
    459459}
    460460
    461 void ThreadCondition::wait(Mutex& mutex)
     461void ThreadCondition::wait(DeprecatedMutex& mutex)
    462462{
    463463    m_condition.timedWait(mutex.impl(), INFINITE);
    464464}
    465465
    466 bool ThreadCondition::timedWait(Mutex& mutex, double absoluteTime)
     466bool ThreadCondition::timedWait(DeprecatedMutex& mutex, double absoluteTime)
    467467{
    468468    DWORD interval = absoluteTimeToWaitTimeoutInterval(absoluteTime);
  • trunk/Source/WTF/wtf/WorkQueue.h

    r185502 r187972  
    114114    volatile LONG m_isWorkThreadRegistered;
    115115
    116     Mutex m_workItemQueueLock;
     116    DeprecatedMutex m_workItemQueueLock;
    117117    Vector<RefPtr<WorkItemWin>> m_workItemQueue;
    118118
    119     Mutex m_handlesLock;
     119    DeprecatedMutex m_handlesLock;
    120120    HashMap<HANDLE, RefPtr<HandleWorkItem>> m_handles;
    121121
  • trunk/Source/WTF/wtf/dtoa.cpp

    r184555 r187972  
    5555namespace WTF {
    5656
    57 Mutex* s_dtoaP5Mutex;
     57DeprecatedMutex* s_dtoaP5Mutex;
    5858
    5959typedef union {
  • trunk/Source/WTF/wtf/dtoa.h

    r165703 r187972  
    2929namespace WTF {
    3030
    31 class Mutex;
     31class DeprecatedMutex;
    3232
    33 extern Mutex* s_dtoaP5Mutex;
     33extern DeprecatedMutex* s_dtoaP5Mutex;
    3434
    3535typedef char DtoaBuffer[80];
  • trunk/Source/WTF/wtf/efl/DispatchQueueEfl.cpp

    r181271 r187972  
    9696{
    9797    {
    98         MutexLocker locker(m_workItemsLock);
     98        DeprecatedMutexLocker locker(m_workItemsLock);
    9999        m_workItems.append(WTF::move(item));
    100100    }
     
    147147
    148148        {
    149             MutexLocker locker(m_workItemsLock);
     149            DeprecatedMutexLocker locker(m_workItemsLock);
    150150            if (m_workItems.isEmpty())
    151151                return;
     
    165165    {
    166166        // Protects m_timerWorkItems.
    167         MutexLocker locker(m_timerWorkItemsLock);
     167        DeprecatedMutexLocker locker(m_timerWorkItemsLock);
    168168        if (m_timerWorkItems.isEmpty())
    169169            return;
     
    210210    size_t position = 0;
    211211
    212     MutexLocker locker(m_timerWorkItemsLock);
     212    DeprecatedMutexLocker locker(m_timerWorkItemsLock);
    213213    // The items should be ordered by expire time.
    214214    for (; position < m_timerWorkItems.size(); ++position)
     
    230230void DispatchQueue::wakeUpThread()
    231231{
    232     MutexLocker locker(m_writeToPipeDescriptorLock);
     232    DeprecatedMutexLocker locker(m_writeToPipeDescriptorLock);
    233233    if (write(m_writeToPipeDescriptor, &wakeUpThreadMessage, sizeof(char)) == -1)
    234234        LOG_ERROR("Failed to wake up DispatchQueue Thread");
     
    237237timeval* DispatchQueue::getNextTimeOut() const
    238238{
    239     MutexLocker locker(m_timerWorkItemsLock);
     239    DeprecatedMutexLocker locker(m_timerWorkItemsLock);
    240240    if (m_timerWorkItems.isEmpty())
    241241        return 0;
  • trunk/Source/WTF/wtf/efl/DispatchQueueEfl.h

    r183746 r187972  
    6464    int m_readFromPipeDescriptor;
    6565    int m_writeToPipeDescriptor;
    66     Mutex m_writeToPipeDescriptorLock;
     66    DeprecatedMutex m_writeToPipeDescriptorLock;
    6767
    6868    bool m_isThreadRunning;
     
    7272
    7373    Vector<std::unique_ptr<WorkItem>> m_workItems;
    74     Mutex m_workItemsLock;
     74    DeprecatedMutex m_workItemsLock;
    7575
    7676    Vector<std::unique_ptr<TimerWorkItem>> m_timerWorkItems;
    77     mutable Mutex m_timerWorkItemsLock;
     77    mutable DeprecatedMutex m_timerWorkItemsLock;
    7878};
    7979
  • trunk/Source/WTF/wtf/efl/RunLoopEfl.cpp

    r183063 r187972  
    6060
    6161    {
    62         MutexLocker locker(loop->m_wakeUpEventRequestedLock);
     62        DeprecatedMutexLocker locker(loop->m_wakeUpEventRequestedLock);
    6363        loop->m_wakeUpEventRequested = false;
    6464    }
     
    7070{
    7171    {
    72         MutexLocker locker(m_wakeUpEventRequestedLock);
     72        DeprecatedMutexLocker locker(m_wakeUpEventRequestedLock);
    7373        if (m_wakeUpEventRequested)
    7474            return;
     
    7777
    7878    {
    79         MutexLocker locker(m_pipeLock);
     79        DeprecatedMutexLocker locker(m_pipeLock);
    8080        ecore_pipe_write(m_pipe.get(), wakupEcorePipeMessage, ecorePipeMessageSize);
    8181    }
  • trunk/Source/WTF/wtf/threads/BinarySemaphore.cpp

    r185849 r187972  
    4040void BinarySemaphore::signal()
    4141{
    42     MutexLocker locker(m_mutex);
     42    DeprecatedMutexLocker locker(m_mutex);
    4343
    4444    m_isSet = true;
     
    4848bool BinarySemaphore::wait(double absoluteTime)
    4949{
    50     MutexLocker locker(m_mutex);
     50    DeprecatedMutexLocker locker(m_mutex);
    5151
    5252    bool timedOut = false;
  • trunk/Source/WTF/wtf/threads/BinarySemaphore.h

    r185847 r187972  
    4545    bool m_isSet;
    4646
    47     Mutex m_mutex;
     47    DeprecatedMutex m_mutex;
    4848    ThreadCondition m_condition;
    4949};
  • trunk/Source/WTF/wtf/win/WorkQueueWin.cpp

    r181257 r187972  
    4242
    4343    {
    44         MutexLocker lock(queue->m_workItemQueueLock);
     44        DeprecatedMutexLocker lock(queue->m_workItemQueueLock);
    4545        queue->m_workItemQueue.append(item);
    4646
     
    121121{
    122122#if !ASSERT_DISABLED
    123     MutexLocker lock(m_handlesLock);
     123    DeprecatedMutexLocker lock(m_handlesLock);
    124124    ASSERT(m_handles.isEmpty());
    125125#endif
     
    132132void WorkQueue::dispatch(std::function<void()> function)
    133133{
    134     MutexLocker locker(m_workItemQueueLock);
     134    DeprecatedMutexLocker locker(m_workItemQueueLock);
    135135    ref();
    136136    m_workItemQueue.append(WorkItemWin::create(function, this));
     
    151151    WorkQueue* queue;
    152152    std::function<void()> function;
    153     Mutex timerMutex;
     153    DeprecatedMutex timerMutex;
    154154    HANDLE timer;
    155155
     
    172172    timerContext->queue->dispatch(timerContext->function);
    173173
    174     MutexLocker lock(timerContext->timerMutex);
     174    DeprecatedMutexLocker lock(timerContext->timerMutex);
    175175    ASSERT(timerContext->timer);
    176176    ASSERT(timerContext->queue->m_timerQueue);
     
    194194        // context->timer with a mutex to ensure the timer callback doesn't access it before the
    195195        // timer handle has been stored in it.
    196         MutexLocker lock(context->timerMutex);
     196        DeprecatedMutexLocker lock(context->timerMutex);
    197197
    198198        // Since our timer callback is quick, we can execute in the timer thread itself and avoid
  • trunk/Source/WebCore/ChangeLog

    r187971 r187972  
     12015-08-04  Filip Pizlo  <[email protected]>
     2
     3        Rename Mutex to DeprecatedMutex
     4        https://bugs.webkit.org/show_bug.cgi?id=147675
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        No new tests because this is just a renaming.
     9
     10        * Modules/webaudio/AsyncAudioDecoder.cpp:
     11        (WebCore::AsyncAudioDecoder::AsyncAudioDecoder):
     12        (WebCore::AsyncAudioDecoder::runLoop):
     13        * Modules/webaudio/AsyncAudioDecoder.h:
     14        * Modules/webaudio/AudioContext.h:
     15        * Modules/webaudio/MediaStreamAudioSource.cpp:
     16        (WebCore::MediaStreamAudioSource::addAudioConsumer):
     17        (WebCore::MediaStreamAudioSource::removeAudioConsumer):
     18        (WebCore::MediaStreamAudioSource::setAudioFormat):
     19        (WebCore::MediaStreamAudioSource::consumeAudio):
     20        * Modules/webaudio/MediaStreamAudioSource.h:
     21        * Modules/webdatabase/Database.cpp:
     22        (WebCore::Database::close):
     23        (WebCore::Database::runTransaction):
     24        (WebCore::Database::inProgressTransactionCompleted):
     25        (WebCore::Database::hasPendingTransaction):
     26        * Modules/webdatabase/DatabaseBackend.h:
     27        * Modules/webdatabase/DatabaseBackendBase.cpp:
     28        (WebCore::DatabaseBackendBase::performOpenAndVerify):
     29        (WebCore::DatabaseBackendBase::isInterrupted):
     30        * Modules/webdatabase/DatabaseContext.cpp:
     31        (WebCore::DatabaseContext::databaseThread):
     32        (WebCore::DatabaseContext::setPaused):
     33        * Modules/webdatabase/DatabaseContext.h:
     34        * Modules/webdatabase/DatabaseTask.h:
     35        * Modules/webdatabase/DatabaseThread.cpp:
     36        (WebCore::DatabaseThread::start):
     37        (WebCore::DatabaseThread::setPaused):
     38        (WebCore::DatabaseThread::handlePausedQueue):
     39        (WebCore::DatabaseThread::databaseThread):
     40        * Modules/webdatabase/DatabaseThread.h:
     41        * Modules/webdatabase/DatabaseTracker.cpp:
     42        (WebCore::DatabaseTracker::setDatabaseDirectoryPath):
     43        (WebCore::DatabaseTracker::canEstablishDatabase):
     44        (WebCore::DatabaseTracker::retryCanEstablishDatabase):
     45        (WebCore::DatabaseTracker::hasEntryForOrigin):
     46        (WebCore::DatabaseTracker::getMaxSizeForDatabase):
     47        (WebCore::DatabaseTracker::closeAllDatabases):
     48        (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
     49        (WebCore::DatabaseTracker::fullPathForDatabase):
     50        (WebCore::DatabaseTracker::origins):
     51        (WebCore::DatabaseTracker::databaseNamesForOrigin):
     52        (WebCore::DatabaseTracker::detailsForNameAndOrigin):
     53        (WebCore::DatabaseTracker::setDatabaseDetails):
     54        (WebCore::DatabaseTracker::doneCreatingDatabase):
     55        (WebCore::DatabaseTracker::addOpenDatabase):
     56        (WebCore::DatabaseTracker::removeOpenDatabase):
     57        (WebCore::DatabaseTracker::getOpenDatabases):
     58        (WebCore::DatabaseTracker::originLockFor):
     59        (WebCore::DatabaseTracker::quotaForOrigin):
     60        (WebCore::DatabaseTracker::setQuota):
     61        (WebCore::DatabaseTracker::deleteOrigin):
     62        (WebCore::DatabaseTracker::deleteDatabase):
     63        (WebCore::DatabaseTracker::deleteDatabaseFile):
     64        (WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
     65        (WebCore::DatabaseTracker::deleteDatabaseFileIfEmpty):
     66        (WebCore::DatabaseTracker::openDatabaseMutex):
     67        (WebCore::DatabaseTracker::setDatabasesPaused):
     68        (WebCore::DatabaseTracker::setClient):
     69        (WebCore::notificationMutex):
     70        (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
     71        (WebCore::DatabaseTracker::notifyDatabasesChanged):
     72        * Modules/webdatabase/DatabaseTracker.h:
     73        * Modules/webdatabase/OriginLock.h:
     74        * Modules/webdatabase/SQLCallbackWrapper.h:
     75        (WebCore::SQLCallbackWrapper::clear):
     76        (WebCore::SQLCallbackWrapper::unwrap):
     77        (WebCore::SQLCallbackWrapper::hasCallback):
     78        * Modules/webdatabase/SQLTransactionBackend.cpp:
     79        (WebCore::SQLTransactionBackend::doCleanup):
     80        (WebCore::SQLTransactionBackend::enqueueStatementBackend):
     81        (WebCore::SQLTransactionBackend::getNextStatement):
     82        * Modules/webdatabase/SQLTransactionBackend.h:
     83        * bindings/js/WorkerScriptController.cpp:
     84        (WebCore::WorkerScriptController::scheduleExecutionTermination):
     85        (WebCore::WorkerScriptController::isExecutionTerminating):
     86        * bindings/js/WorkerScriptController.h:
     87        * dom/default/PlatformMessagePortChannel.cpp:
     88        (WebCore::MessagePortChannel::postMessageToRemote):
     89        (WebCore::MessagePortChannel::tryGetMessageFromRemote):
     90        (WebCore::MessagePortChannel::isConnectedTo):
     91        (WebCore::MessagePortChannel::hasPendingActivity):
     92        (WebCore::MessagePortChannel::locallyEntangledPort):
     93        (WebCore::PlatformMessagePortChannel::setRemotePort):
     94        (WebCore::PlatformMessagePortChannel::entangledChannel):
     95        (WebCore::PlatformMessagePortChannel::closeInternal):
     96        * dom/default/PlatformMessagePortChannel.h:
     97        * loader/icon/IconDatabase.cpp:
     98        (WebCore::IconDatabase::removeAllIcons):
     99        (WebCore::IconDatabase::synchronousIconForPageURL):
     100        (WebCore::IconDatabase::synchronousNativeIconForPageURL):
     101        (WebCore::IconDatabase::synchronousIconURLForPageURL):
     102        (WebCore::IconDatabase::retainIconForPageURL):
     103        (WebCore::IconDatabase::performRetainIconForPageURL):
     104        (WebCore::IconDatabase::releaseIconForPageURL):
     105        (WebCore::IconDatabase::performReleaseIconForPageURL):
     106        (WebCore::IconDatabase::setIconDataForIconURL):
     107        (WebCore::IconDatabase::setIconURLForPageURL):
     108        (WebCore::IconDatabase::synchronousLoadDecisionForIconURL):
     109        (WebCore::IconDatabase::synchronousIconDataKnownForIconURL):
     110        (WebCore::IconDatabase::pageURLMappingCount):
     111        (WebCore::IconDatabase::retainedPageURLCount):
     112        (WebCore::IconDatabase::iconRecordCount):
     113        (WebCore::IconDatabase::iconRecordCountWithData):
     114        (WebCore::IconDatabase::wakeSyncThread):
     115        (WebCore::IconDatabase::isOpenBesidesMainThreadCallbacks):
     116        (WebCore::IconDatabase::databasePath):
     117        (WebCore::IconDatabase::getOrCreatePageURLRecord):
     118        (WebCore::IconDatabase::iconDatabaseSyncThread):
     119        (WebCore::IconDatabase::performOpenInitialization):
     120        (WebCore::IconDatabase::performURLImport):
     121        (WebCore::IconDatabase::syncThreadMainLoop):
     122        (WebCore::IconDatabase::performPendingRetainAndReleaseOperations):
     123        (WebCore::IconDatabase::readFromDatabase):
     124        (WebCore::IconDatabase::writeToDatabase):
     125        (WebCore::IconDatabase::pruneUnretainedIcons):
     126        (WebCore::IconDatabase::cleanupSyncThread):
     127        * loader/icon/IconDatabase.h:
     128        * page/scrolling/ScrollingTree.cpp:
     129        (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
     130        (WebCore::ScrollingTree::commitNewTreeState):
     131        (WebCore::ScrollingTree::setMainFramePinState):
     132        (WebCore::ScrollingTree::mainFrameScrollPosition):
     133        (WebCore::ScrollingTree::setMainFrameScrollPosition):
     134        (WebCore::ScrollingTree::isPointInNonFastScrollableRegion):
     135        (WebCore::ScrollingTree::isRubberBandInProgress):
     136        (WebCore::ScrollingTree::setMainFrameIsRubberBanding):
     137        (WebCore::ScrollingTree::isScrollSnapInProgress):
     138        (WebCore::ScrollingTree::setMainFrameIsScrollSnapping):
     139        (WebCore::ScrollingTree::setCanRubberBandState):
     140        (WebCore::ScrollingTree::rubberBandsAtLeft):
     141        (WebCore::ScrollingTree::rubberBandsAtRight):
     142        (WebCore::ScrollingTree::rubberBandsAtBottom):
     143        (WebCore::ScrollingTree::rubberBandsAtTop):
     144        (WebCore::ScrollingTree::setScrollPinningBehavior):
     145        (WebCore::ScrollingTree::scrollPinningBehavior):
     146        (WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
     147        (WebCore::ScrollingTree::latchedNode):
     148        (WebCore::ScrollingTree::setLatchedNode):
     149        (WebCore::ScrollingTree::clearLatchedNode):
     150        * page/scrolling/ScrollingTree.h:
     151        * platform/MemoryPressureHandler.h:
     152        * platform/audio/HRTFDatabaseLoader.cpp:
     153        (WebCore::HRTFDatabaseLoader::loadAsynchronously):
     154        (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):
     155        * platform/audio/HRTFDatabaseLoader.h:
     156        * platform/cocoa/MemoryPressureHandlerCocoa.mm:
     157        (WebCore::MemoryPressureHandler::setReceivedMemoryPressure):
     158        (WebCore::MemoryPressureHandler::clearMemoryPressure):
     159        (WebCore::MemoryPressureHandler::shouldWaitForMemoryClearMessage):
     160        (WebCore::MemoryPressureHandler::respondToMemoryPressureIfNeeded):
     161        * platform/graphics/DisplayRefreshMonitor.cpp:
     162        (WebCore::DisplayRefreshMonitor::displayDidRefresh):
     163        * platform/graphics/DisplayRefreshMonitor.h:
     164        (WebCore::DisplayRefreshMonitor::setMonotonicAnimationStartTime):
     165        (WebCore::DisplayRefreshMonitor::mutex):
     166        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
     167        (WebCore::MediaPlayerPrivateAVFoundation::setDelayCallbacks):
     168        (WebCore::MediaPlayerPrivateAVFoundation::clearMainThreadPendingFlag):
     169        (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
     170        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
     171        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
     172        (WebCore::AVFWrapper::callbackContext):
     173        (WebCore::AVFWrapper::~AVFWrapper):
     174        (WebCore::AVFWrapper::mapLock):
     175        (WebCore::AVFWrapper::addToMap):
     176        (WebCore::AVFWrapper::removeFromMap):
     177        (WebCore::AVFWrapper::periodicTimeObserverCallback):
     178        (WebCore::AVFWrapper::processNotification):
     179        (WebCore::AVFWrapper::loadPlayableCompletionCallback):
     180        (WebCore::AVFWrapper::loadMetadataCompletionCallback):
     181        (WebCore::AVFWrapper::seekCompletedCallback):
     182        (WebCore::AVFWrapper::processCue):
     183        (WebCore::AVFWrapper::legibleOutputCallback):
     184        (WebCore::AVFWrapper::processShouldWaitForLoadingOfResource):
     185        (WebCore::AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource):
     186        * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
     187        (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
     188        (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
     189        * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
     190        * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
     191        (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
     192        (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
     193        * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
     194        * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
     195        (WebCore::DisplayRefreshMonitorMac::requestRefreshCallback):
     196        (WebCore::DisplayRefreshMonitorMac::displayLinkFired):
     197        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
     198        (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
     199        (WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
     200        (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
     201        (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
     202        (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
     203        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
     204        * platform/ios/LegacyTileCache.h:
     205        * platform/ios/LegacyTileCache.mm:
     206        (WebCore::LegacyTileCache::setTilesOpaque):
     207        (WebCore::LegacyTileCache::doLayoutTiles):
     208        (WebCore::LegacyTileCache::setCurrentScale):
     209        (WebCore::LegacyTileCache::commitScaleChange):
     210        (WebCore::LegacyTileCache::layoutTilesNow):
     211        (WebCore::LegacyTileCache::layoutTilesNowForRect):
     212        (WebCore::LegacyTileCache::removeAllNonVisibleTiles):
     213        (WebCore::LegacyTileCache::removeAllTiles):
     214        (WebCore::LegacyTileCache::removeForegroundTiles):
     215        (WebCore::LegacyTileCache::setContentReplacementImage):
     216        (WebCore::LegacyTileCache::contentReplacementImage):
     217        (WebCore::LegacyTileCache::tileCreationTimerFired):
     218        (WebCore::LegacyTileCache::setNeedsDisplayInRect):
     219        (WebCore::LegacyTileCache::updateTilingMode):
     220        (WebCore::LegacyTileCache::setTilingMode):
     221        (WebCore::LegacyTileCache::doPendingRepaints):
     222        (WebCore::LegacyTileCache::flushSavedDisplayRects):
     223        (WebCore::LegacyTileCache::prepareToDraw):
     224        * platform/ios/LegacyTileLayerPool.h:
     225        * platform/ios/LegacyTileLayerPool.mm:
     226        (WebCore::LegacyTileLayerPool::addLayer):
     227        (WebCore::LegacyTileLayerPool::takeLayerWithSize):
     228        (WebCore::LegacyTileLayerPool::setCapacity):
     229        (WebCore::LegacyTileLayerPool::prune):
     230        (WebCore::LegacyTileLayerPool::drain):
     231        * platform/network/curl/CurlDownload.cpp:
     232        (WebCore::CurlDownloadManager::add):
     233        (WebCore::CurlDownloadManager::remove):
     234        (WebCore::CurlDownloadManager::getActiveDownloadCount):
     235        (WebCore::CurlDownloadManager::getPendingDownloadCount):
     236        (WebCore::CurlDownloadManager::stopThreadIfIdle):
     237        (WebCore::CurlDownloadManager::updateHandleList):
     238        (WebCore::CurlDownload::~CurlDownload):
     239        (WebCore::CurlDownload::init):
     240        (WebCore::CurlDownload::getTempPath):
     241        (WebCore::CurlDownload::getUrl):
     242        (WebCore::CurlDownload::getResponse):
     243        (WebCore::CurlDownload::closeFile):
     244        (WebCore::CurlDownload::didReceiveHeader):
     245        (WebCore::CurlDownload::didReceiveData):
     246        (WebCore::CurlDownload::didFail):
     247        * platform/network/curl/CurlDownload.h:
     248        * platform/network/curl/ResourceHandleManager.cpp:
     249        (WebCore::cookieJarPath):
     250        (WebCore::sharedResourceMutex):
     251        (WebCore::curl_lock_callback):
     252        (WebCore::curl_unlock_callback):
     253        * platform/network/ios/QuickLook.mm:
     254        (WebCore::QLDirectoryAttributes):
     255        (qlPreviewConverterDictionaryMutex):
     256        (WebCore::addQLPreviewConverterWithFileForURL):
     257        (WebCore::qlPreviewConverterUTIForURL):
     258        (WebCore::removeQLPreviewConverterForURL):
     259        (WebCore::safeQLURLForDocumentURLAndResourceURL):
     260        * platform/sql/SQLiteDatabase.cpp:
     261        (WebCore::SQLiteDatabase::close):
     262        (WebCore::SQLiteDatabase::interrupt):
     263        (WebCore::SQLiteDatabase::maximumSize):
     264        (WebCore::SQLiteDatabase::setMaximumSize):
     265        (WebCore::SQLiteDatabase::pageSize):
     266        (WebCore::SQLiteDatabase::freeSpaceSize):
     267        (WebCore::SQLiteDatabase::totalSize):
     268        (WebCore::SQLiteDatabase::runIncrementalVacuumCommand):
     269        (WebCore::SQLiteDatabase::setAuthorizer):
     270        * platform/sql/SQLiteDatabase.h:
     271        (WebCore::SQLiteDatabase::databaseMutex):
     272        * platform/sql/SQLiteStatement.cpp:
     273        (WebCore::SQLiteStatement::prepare):
     274        (WebCore::SQLiteStatement::step):
     275        * workers/WorkerThread.cpp:
     276        (WebCore::WorkerThread::start):
     277        (WebCore::WorkerThread::workerThread):
     278        (WebCore::WorkerThread::stop):
     279        * workers/WorkerThread.h:
     280
    12812015-08-05  Matthew Daiter  <[email protected]>
    2282
  • trunk/Source/WebCore/Modules/webaudio/AsyncAudioDecoder.cpp

    r180598 r187972  
    3939{
    4040    // Start worker thread.
    41     MutexLocker lock(m_threadCreationMutex);
     41    DeprecatedMutexLocker lock(m_threadCreationMutex);
    4242    m_threadID = createThread(AsyncAudioDecoder::threadEntry, this, "Audio Decoder");
    4343}
     
    7777    {
    7878        // Wait for until we have m_threadID established before starting the run loop.
    79         MutexLocker lock(m_threadCreationMutex);
     79        DeprecatedMutexLocker lock(m_threadCreationMutex);
    8080    }
    8181
  • trunk/Source/WebCore/Modules/webaudio/AsyncAudioDecoder.h

    r180598 r187972  
    8282
    8383    WTF::ThreadIdentifier m_threadID;
    84     Mutex m_threadCreationMutex;
     84    DeprecatedMutex m_threadCreationMutex;
    8585    MessageQueue<DecodingTask> m_queue;
    8686};
  • trunk/Source/WebCore/Modules/webaudio/AudioContext.h

    r186396 r187972  
    381381
    382382    // Graph locking.
    383     Mutex m_contextGraphMutex;
     383    DeprecatedMutex m_contextGraphMutex;
    384384    volatile ThreadIdentifier m_audioThread { 0 };
    385385    volatile ThreadIdentifier m_graphOwnerThread; // if the lock is held then this is the thread which owns it, otherwise == UndefinedThreadIdentifier
  • trunk/Source/WebCore/Modules/webaudio/MediaStreamAudioSource.cpp

    r185316 r187972  
    6464void MediaStreamAudioSource::addAudioConsumer(PassRefPtr<AudioDestinationConsumer> consumer)
    6565{
    66     MutexLocker locker(m_audioConsumersLock);
     66    DeprecatedMutexLocker locker(m_audioConsumersLock);
    6767    m_audioConsumers.append(consumer);
    6868}
     
    7070bool MediaStreamAudioSource::removeAudioConsumer(AudioDestinationConsumer* consumer)
    7171{
    72     MutexLocker locker(m_audioConsumersLock);
     72    DeprecatedMutexLocker locker(m_audioConsumersLock);
    7373    size_t pos = m_audioConsumers.find(consumer);
    7474    if (pos != notFound) {
     
    8181void MediaStreamAudioSource::setAudioFormat(size_t numberOfChannels, float sampleRate)
    8282{
    83     MutexLocker locker(m_audioConsumersLock);
     83    DeprecatedMutexLocker locker(m_audioConsumersLock);
    8484    for (auto& consumer : m_audioConsumers)
    8585        consumer->setFormat(numberOfChannels, sampleRate);
     
    8888void MediaStreamAudioSource::consumeAudio(AudioBus* bus, size_t numberOfFrames)
    8989{
    90     MutexLocker locker(m_audioConsumersLock);
     90    DeprecatedMutexLocker locker(m_audioConsumersLock);
    9191    for (auto& consumer : m_audioConsumers)
    9292        consumer->consumeAudio(bus, numberOfFrames);
  • trunk/Source/WebCore/Modules/webaudio/MediaStreamAudioSource.h

    r184940 r187972  
    6666
    6767    String m_deviceId;
    68     Mutex m_audioConsumersLock;
     68    DeprecatedMutex m_audioConsumersLock;
    6969    Vector<RefPtr<AudioDestinationConsumer>> m_audioConsumers;
    7070    RealtimeMediaSourceStates m_currentStates;
  • trunk/Source/WebCore/Modules/webdatabase/Database.cpp

    r187931 r187972  
    116116
    117117    {
    118         MutexLocker locker(m_transactionInProgressMutex);
     118        DeprecatedMutexLocker locker(m_transactionInProgressMutex);
    119119
    120120        // Clean up transactions that have not been scheduled yet:
     
    175175PassRefPtr<SQLTransactionBackend> Database::runTransaction(PassRefPtr<SQLTransaction> transaction, bool readOnly, const ChangeVersionData* data)
    176176{
    177     MutexLocker locker(m_transactionInProgressMutex);
     177    DeprecatedMutexLocker locker(m_transactionInProgressMutex);
    178178    if (!m_isTransactionQueueEnabled)
    179179        return 0;
     
    203203void Database::inProgressTransactionCompleted()
    204204{
    205     MutexLocker locker(m_transactionInProgressMutex);
     205    DeprecatedMutexLocker locker(m_transactionInProgressMutex);
    206206    m_transactionInProgress = false;
    207207    scheduleTransaction();
     
    210210bool Database::hasPendingTransaction()
    211211{
    212     MutexLocker locker(m_transactionInProgressMutex);
     212    DeprecatedMutexLocker locker(m_transactionInProgressMutex);
    213213    return m_transactionInProgress || !m_transactionQueue.isEmpty();
    214214}
  • trunk/Source/WebCore/Modules/webdatabase/DatabaseBackend.h

    r178575 r187972  
    5858
    5959    Deque<RefPtr<SQLTransactionBackend>> m_transactionQueue;
    60     Mutex m_transactionInProgressMutex;
     60    DeprecatedMutex m_transactionInProgressMutex;
    6161    bool m_transactionInProgress;
    6262    bool m_isTransactionQueueEnabled;
  • trunk/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp

    r183663 r187972  
    323323    {
    324324        // Make sure we wait till the background removal of the empty database files finished before trying to open any database.
    325         MutexLocker locker(DatabaseTracker::openDatabaseMutex());
     325        DeprecatedMutexLocker locker(DatabaseTracker::openDatabaseMutex());
    326326    }
    327327#endif
     
    594594bool DatabaseBackendBase::isInterrupted()
    595595{
    596     MutexLocker locker(m_sqliteDatabase.databaseMutex());
     596    DeprecatedMutexLocker locker(m_sqliteDatabase.databaseMutex());
    597597    return m_sqliteDatabase.isInterrupted();
    598598}
  • trunk/Source/WebCore/Modules/webdatabase/DatabaseTask.h

    r187931 r187972  
    6060private:
    6161    bool m_taskCompleted;
    62     Mutex m_synchronousMutex;
     62    DeprecatedMutex m_synchronousMutex;
    6363    ThreadCondition m_synchronousCondition;
    6464#ifndef NDEBUG
  • trunk/Source/WebCore/Modules/webdatabase/DatabaseThread.cpp

    r187931 r187972  
    6262bool DatabaseThread::start()
    6363{
    64     MutexLocker lock(m_threadCreationMutex);
     64    DeprecatedMutexLocker lock(m_threadCreationMutex);
    6565
    6666    if (m_threadID)
     
    101101    {
    102102        // Wait for DatabaseThread::start() to complete.
    103         MutexLocker lock(m_threadCreationMutex);
     103        DeprecatedMutexLocker lock(m_threadCreationMutex);
    104104        LOG(StorageAPI, "Started DatabaseThread %p", this);
    105105    }
  • trunk/Source/WebCore/Modules/webdatabase/DatabaseThread.h

    r187926 r187972  
    7373    void databaseThread();
    7474
    75     Mutex m_threadCreationMutex;
     75    DeprecatedMutex m_threadCreationMutex;
    7676    ThreadIdentifier m_threadID;
    7777    RefPtr<DatabaseThread> m_selfRef;
  • trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp

    r187927 r187972  
    9090void DatabaseTracker::setDatabaseDirectoryPath(const String& path)
    9191{
    92     MutexLocker lockDatabase(m_databaseGuard);
     92    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    9393    ASSERT(!m_database.isOpen());
    9494    m_databaseDirectoryPath = path.isolatedCopy();
     
    167167    error = DatabaseError::None;
    168168
    169     MutexLocker lockDatabase(m_databaseGuard);
     169    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    170170    SecurityOrigin* origin = context->securityOrigin();
    171171
     
    219219    error = DatabaseError::None;
    220220
    221     MutexLocker lockDatabase(m_databaseGuard);
     221    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    222222    SecurityOrigin* origin = context->securityOrigin();
    223223
     
    258258bool DatabaseTracker::hasEntryForOrigin(SecurityOrigin* origin)
    259259{
    260     MutexLocker lockDatabase(m_databaseGuard);
     260    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    261261    return hasEntryForOriginNoLock(origin);
    262262}
     
    287287    // The maximum size for a database is the full quota for its origin, minus the current usage within the origin,
    288288    // plus the current usage of the given database
    289     MutexLocker lockDatabase(m_databaseGuard);
     289    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    290290    SecurityOrigin* origin = database->securityOrigin();
    291291
     
    312312    Vector<Ref<Database>> openDatabases;
    313313    {
    314         MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
     314        DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
    315315        if (!m_openDatabaseMap)
    316316            return;
     
    390390String DatabaseTracker::fullPathForDatabase(SecurityOrigin* origin, const String& name, bool createIfNotExists)
    391391{
    392     MutexLocker lockDatabase(m_databaseGuard);
     392    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    393393    return fullPathForDatabaseNoLock(origin, name, createIfNotExists).isolatedCopy();
    394394}
     
    396396void DatabaseTracker::origins(Vector<RefPtr<SecurityOrigin>>& originsResult)
    397397{
    398     MutexLocker lockDatabase(m_databaseGuard);
     398    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    399399
    400400    openTrackerDatabase(DontCreateIfDoesNotExist);
     
    449449    Vector<String> temp;
    450450    {
    451         MutexLocker lockDatabase(m_databaseGuard);
     451        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    452452        if (!databaseNamesForOriginNoLock(origin, temp))
    453453          return false;
     
    466466
    467467    {
    468         MutexLocker lockDatabase(m_databaseGuard);
     468        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    469469
    470470        openTrackerDatabase(DontCreateIfDoesNotExist);
     
    501501    int64_t guid = 0;
    502502
    503     MutexLocker lockDatabase(m_databaseGuard);
     503    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    504504
    505505    openTrackerDatabase(CreateIfDoesNotExist);
     
    550550void DatabaseTracker::doneCreatingDatabase(Database* database)
    551551{
    552     MutexLocker lockDatabase(m_databaseGuard);
     552    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    553553    doneCreatingDatabase(database->securityOrigin(), database->stringIdentifier());
    554554}
     
    560560
    561561    {
    562         MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
     562        DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
    563563
    564564        if (!m_openDatabaseMap)
     
    590590
    591591    {
    592         MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
     592        DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
    593593
    594594        if (!m_openDatabaseMap) {
     
    630630void DatabaseTracker::getOpenDatabases(SecurityOrigin* origin, const String& name, HashSet<RefPtr<Database>>* databases)
    631631{
    632     MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
     632    DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
    633633    if (!m_openDatabaseMap)
    634634        return;
     
    648648RefPtr<OriginLock> DatabaseTracker::originLockFor(SecurityOrigin* origin)
    649649{
    650     MutexLocker lockDatabase(m_databaseGuard);
     650    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    651651    String databaseIdentifier = origin->databaseIdentifier();
    652652
     
    728728unsigned long long DatabaseTracker::quotaForOrigin(SecurityOrigin* origin)
    729729{
    730     MutexLocker lockDatabase(m_databaseGuard);
     730    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    731731    return quotaForOriginNoLock(origin);
    732732}
     
    734734void DatabaseTracker::setQuota(SecurityOrigin* origin, unsigned long long quota)
    735735{
    736     MutexLocker lockDatabase(m_databaseGuard);
     736    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    737737
    738738    if (quotaForOriginNoLock(origin) == quota)
     
    865865    Vector<String> databaseNames;
    866866    {
    867         MutexLocker lockDatabase(m_databaseGuard);
     867        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    868868        openTrackerDatabase(DontCreateIfDoesNotExist);
    869869        if (!m_database.isOpen())
     
    891891
    892892    {
    893         MutexLocker lockDatabase(m_databaseGuard);
     893        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    894894        deleteOriginLockFor(origin);
    895895        doneDeletingOrigin(origin);
     
    10721072{
    10731073    {
    1074         MutexLocker lockDatabase(m_databaseGuard);
     1074        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    10751075        openTrackerDatabase(DontCreateIfDoesNotExist);
    10761076        if (!m_database.isOpen())
     
    10871087    if (!deleteDatabaseFile(origin, name)) {
    10881088        LOG_ERROR("Unable to delete file for database %s in origin %s", name.ascii().data(), origin->databaseIdentifier().ascii().data());
    1089         MutexLocker lockDatabase(m_databaseGuard);
     1089        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    10901090        doneDeletingDatabase(origin, name);
    10911091        return false;
    10921092    }
    10931093
    1094     MutexLocker lockDatabase(m_databaseGuard);
     1094    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    10951095
    10961096    SQLiteStatement statement(m_database, "DELETE FROM Databases WHERE origin=? AND name=?");
     
    11321132#ifndef NDEBUG
    11331133    {
    1134         MutexLocker lockDatabase(m_databaseGuard);
     1134        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    11351135        ASSERT(isDeletingDatabaseOrOriginFor(origin, name));
    11361136    }
     
    11431143    // during the synchronous DatabaseThread call it triggers.
    11441144    {
    1145         MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
     1145        DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
    11461146        if (m_openDatabaseMap) {
    11471147            // There are some open databases, lets check if they are for this origin.
     
    11861186    {
    11871187        // Acquire the lock before calling openTrackerDatabase.
    1188         MutexLocker lockDatabase(m_databaseGuard);
     1188        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
    11891189        openTrackerDatabase(DontCreateIfDoesNotExist);
    11901190    }
     
    12021202    // during the synchronous DatabaseThread call it triggers.
    12031203    {
    1204         MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
     1204        DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
    12051205        if (m_openDatabaseMap) {
    12061206            for (auto& openDatabase : *m_openDatabaseMap) {
     
    13061306}
    13071307
    1308 Mutex& DatabaseTracker::openDatabaseMutex()
    1309 {
    1310     static NeverDestroyed<Mutex> mutex;
     1308DeprecatedMutex& DatabaseTracker::openDatabaseMutex()
     1309{
     1310    static NeverDestroyed<DeprecatedMutex> mutex;
    13111311    return mutex;
    13121312}
     
    13311331}
    13321332
    1333 static Mutex& notificationMutex()
    1334 {
    1335     static NeverDestroyed<Mutex> mutex;
     1333static DeprecatedMutex& notificationMutex()
     1334{
     1335    static NeverDestroyed<DeprecatedMutex> mutex;
    13361336    return mutex;
    13371337}
     
    13471347void DatabaseTracker::scheduleNotifyDatabaseChanged(SecurityOrigin* origin, const String& name)
    13481348{
    1349     MutexLocker locker(notificationMutex());
     1349    DeprecatedMutexLocker locker(notificationMutex());
    13501350
    13511351    notificationQueue().append(std::pair<RefPtr<SecurityOrigin>, String>(origin->isolatedCopy(), name.isolatedCopy()));
     
    13731373    NotificationQueue notifications;
    13741374    {
    1375         MutexLocker locker(notificationMutex());
     1375        DeprecatedMutexLocker locker(notificationMutex());
    13761376
    13771377        notifications.swap(notificationQueue());
  • trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.h

    r187927 r187972  
    108108    // clean up zero byte database files.  Any operations to open new database will have to
    109109    // wait for that task to finish by waiting on this mutex.
    110     static Mutex& openDatabaseMutex();
     110    static DeprecatedMutex& openDatabaseMutex();
    111111   
    112112    WEBCORE_EXPORT static void emptyDatabaseFilesRemovalTaskWillBeScheduled();
     
    151151    typedef HashMap<RefPtr<SecurityOrigin>, DatabaseNameMap*> DatabaseOriginMap;
    152152
    153     Mutex m_openDatabaseMapGuard;
     153    DeprecatedMutex m_openDatabaseMapGuard;
    154154    mutable std::unique_ptr<DatabaseOriginMap> m_openDatabaseMap;
    155155
    156156    // This lock protects m_database, m_originLockMap, m_databaseDirectoryPath, m_originsBeingDeleted, m_beingCreated, and m_beingDeleted.
    157     Mutex m_databaseGuard;
     157    DeprecatedMutex m_databaseGuard;
    158158    SQLiteDatabase m_database;
    159159
  • trunk/Source/WebCore/Modules/webdatabase/OriginLock.h

    r181837 r187972  
    4949
    5050    String m_lockFileName;
    51     Mutex m_mutex;
     51    DeprecatedMutex m_mutex;
    5252#if USE(FILE_LOCK)
    5353    PlatformFileHandle m_lockHandle;
  • trunk/Source/WebCore/Modules/webdatabase/SQLCallbackWrapper.h

    r185336 r187972  
    5959        T* callback;
    6060        {
    61             MutexLocker locker(m_mutex);
     61            DeprecatedMutexLocker locker(m_mutex);
    6262            if (!m_callback) {
    6363                ASSERT(!m_scriptExecutionContext);
     
    8484    PassRefPtr<T> unwrap()
    8585    {
    86         MutexLocker locker(m_mutex);
     86        DeprecatedMutexLocker locker(m_mutex);
    8787        ASSERT(!m_callback || m_scriptExecutionContext->isContextThread());
    8888        m_scriptExecutionContext = nullptr;
     
    9494
    9595private:
    96     Mutex m_mutex;
     96    DeprecatedMutex m_mutex;
    9797    RefPtr<T> m_callback;
    9898    RefPtr<ScriptExecutionContext> m_scriptExecutionContext;
  • trunk/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.cpp

    r186279 r187972  
    383383    releaseOriginLockIfNeeded();
    384384
    385     MutexLocker locker(m_statementMutex);
     385    DeprecatedMutexLocker locker(m_statementMutex);
    386386    m_statementQueue.clear();
    387387
     
    467467void SQLTransactionBackend::enqueueStatementBackend(PassRefPtr<SQLStatementBackend> statementBackend)
    468468{
    469     MutexLocker locker(m_statementMutex);
     469    DeprecatedMutexLocker locker(m_statementMutex);
    470470    m_statementQueue.append(statementBackend);
    471471}
     
    667667    m_currentStatementBackend = nullptr;
    668668
    669     MutexLocker locker(m_statementMutex);
     669    DeprecatedMutexLocker locker(m_statementMutex);
    670670    if (!m_statementQueue.isEmpty())
    671671        m_currentStatementBackend = m_statementQueue.takeFirst();
  • trunk/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.h

    r184709 r187972  
    129129    bool m_hasVersionMismatch;
    130130
    131     Mutex m_statementMutex;
     131    DeprecatedMutex m_statementMutex;
    132132    Deque<RefPtr<SQLStatementBackend>> m_statementQueue;
    133133
  • trunk/Source/WebCore/bindings/js/WorkerScriptController.cpp

    r186279 r187972  
    151151    // termination is scheduled, isExecutionTerminating will
    152152    // accurately reflect that state when called from another thread.
    153     MutexLocker locker(m_scheduledTerminationMutex);
     153    DeprecatedMutexLocker locker(m_scheduledTerminationMutex);
    154154    if (m_vm->watchdog)
    155155        m_vm->watchdog->fire();
     
    159159{
    160160    // See comments in scheduleExecutionTermination regarding mutex usage.
    161     MutexLocker locker(m_scheduledTerminationMutex);
     161    DeprecatedMutexLocker locker(m_scheduledTerminationMutex);
    162162    if (m_vm->watchdog)
    163163        return m_vm->watchdog->didFire();
  • trunk/Source/WebCore/bindings/js/WorkerScriptController.h

    r185608 r187972  
    9898        JSC::Strong<JSWorkerGlobalScope> m_workerGlobalScopeWrapper;
    9999        bool m_executionForbidden;
    100         mutable Mutex m_scheduledTerminationMutex;
     100        mutable DeprecatedMutex m_scheduledTerminationMutex;
    101101    };
    102102
  • trunk/Source/WebCore/dom/default/PlatformMessagePortChannel.cpp

    r186279 r187972  
    8989void MessagePortChannel::postMessageToRemote(PassRefPtr<SerializedScriptValue> message, std::unique_ptr<MessagePortChannelArray> channels)
    9090{
    91     MutexLocker lock(m_channel->m_mutex);
     91    DeprecatedMutexLocker lock(m_channel->m_mutex);
    9292    if (!m_channel->m_outgoingQueue)
    9393        return;
     
    9999bool MessagePortChannel::tryGetMessageFromRemote(RefPtr<SerializedScriptValue>& message, std::unique_ptr<MessagePortChannelArray>& channels)
    100100{
    101     MutexLocker lock(m_channel->m_mutex);
     101    DeprecatedMutexLocker lock(m_channel->m_mutex);
    102102    auto result = m_channel->m_incomingQueue->tryGetMessage();
    103103    if (!result)
     
    122122{
    123123    // FIXME: What guarantees that the result remains the same after we release the lock?
    124     MutexLocker lock(m_channel->m_mutex);
     124    DeprecatedMutexLocker lock(m_channel->m_mutex);
    125125    return m_channel->m_remotePort == port;
    126126}
     
    129129{
    130130    // FIXME: What guarantees that the result remains the same after we release the lock?
    131     MutexLocker lock(m_channel->m_mutex);
     131    DeprecatedMutexLocker lock(m_channel->m_mutex);
    132132    return !m_channel->m_incomingQueue->isEmpty();
    133133}
     
    135135MessagePort* MessagePortChannel::locallyEntangledPort(const ScriptExecutionContext* context)
    136136{
    137     MutexLocker lock(m_channel->m_mutex);
     137    DeprecatedMutexLocker lock(m_channel->m_mutex);
    138138    // See if both contexts are run by the same thread (are the same context, or are both documents).
    139139    if (m_channel->m_remotePort) {
     
    165165void PlatformMessagePortChannel::setRemotePort(MessagePort* port)
    166166{
    167     MutexLocker lock(m_mutex);
     167    DeprecatedMutexLocker lock(m_mutex);
    168168    // Should never set port if it is already set.
    169169    ASSERT(!port || !m_remotePort);
     
    176176    // This lock only guarantees that the returned pointer will not be pointing to released memory,
    177177    // but not that it will still be pointing to this object's entangled port channel.
    178     MutexLocker lock(m_mutex);
     178    DeprecatedMutexLocker lock(m_mutex);
    179179    return m_entangledChannel;
    180180}
     
    182182void PlatformMessagePortChannel::closeInternal()
    183183{
    184     MutexLocker lock(m_mutex);
     184    DeprecatedMutexLocker lock(m_mutex);
    185185    // Disentangle ourselves from the other end. We still maintain a reference to our incoming queue, since previously-existing messages should still be delivered.
    186186    m_remotePort = nullptr;
  • trunk/Source/WebCore/dom/default/PlatformMessagePortChannel.h

    r184225 r187972  
    9696        void closeInternal();
    9797
    98         // Mutex used to ensure exclusive access to the object internals.
    99         Mutex m_mutex;
     98        // DeprecatedMutex used to ensure exclusive access to the object internals.
     99        DeprecatedMutex m_mutex;
    100100
    101101        // Pointer to our entangled pair - cleared when close() is called.
  • trunk/Source/WebCore/loader/icon/IconDatabase.cpp

    r186068 r187972  
    187187    // Clear the in-memory record of every IconRecord, anything waiting to be read from disk, and anything waiting to be written to disk
    188188    {
    189         MutexLocker locker(m_urlAndIconLock);
     189        DeprecatedMutexLocker locker(m_urlAndIconLock);
    190190       
    191191        // Clear the IconRecords for every page URL - RefCounting will cause the IconRecords themselves to be deleted
     
    201201        // Clear all in-memory records of things that need to be synced out to disk
    202202        {
    203             MutexLocker locker(m_pendingSyncLock);
     203            DeprecatedMutexLocker locker(m_pendingSyncLock);
    204204            m_pageURLsPendingSync.clear();
    205205            m_iconsPendingSync.clear();
     
    208208        // Clear all in-memory records of things that need to be read in from disk
    209209        {
    210             MutexLocker locker(m_pendingReadingLock);
     210            DeprecatedMutexLocker locker(m_pendingReadingLock);
    211211            m_pageURLsPendingImport.clear();
    212212            m_pageURLsInterestedInIcons.clear();
     
    230230        return 0;
    231231
    232     MutexLocker locker(m_urlAndIconLock);
     232    DeprecatedMutexLocker locker(m_urlAndIconLock);
    233233
    234234    performPendingRetainAndReleaseOperations();
     
    246246    // 2 - The initial url import IS complete and this pageURL has no icon
    247247    if (!pageRecord) {
    248         MutexLocker locker(m_pendingReadingLock);
     248        DeprecatedMutexLocker locker(m_pendingReadingLock);
    249249       
    250250        // Import is ongoing, there might be an icon.  In this case, register to be notified when the icon comes in
     
    277277            pageURLCopy = pageURLOriginal.isolatedCopy();
    278278   
    279         MutexLocker locker(m_pendingReadingLock);
     279        DeprecatedMutexLocker locker(m_pendingReadingLock);
    280280        m_pageURLsInterestedInIcons.add(pageURLCopy);
    281281        m_iconsPendingReading.add(iconRecord);
     
    308308        return 0;
    309309
    310     MutexLocker locker(m_urlAndIconLock);
     310    DeprecatedMutexLocker locker(m_urlAndIconLock);
    311311    return icon->nativeImageForCurrentFrame();
    312312}
     
    330330        return String();
    331331       
    332     MutexLocker locker(m_urlAndIconLock);
     332    DeprecatedMutexLocker locker(m_urlAndIconLock);
    333333   
    334334    PageURLRecord* pageRecord = m_pageURLToRecordMap.get(pageURLOriginal);
     
    418418
    419419    {
    420         MutexLocker locker(m_urlsToRetainOrReleaseLock);
     420        DeprecatedMutexLocker locker(m_urlsToRetainOrReleaseLock);
    421421        m_urlsToRetain.add(pageURL.isolatedCopy());
    422422        m_retainOrReleaseIconRequested = true;
     
    451451            return;
    452452
    453         MutexLocker locker(m_pendingSyncLock);
     453        DeprecatedMutexLocker locker(m_pendingSyncLock);
    454454        // If this pageURL waiting to be sync'ed, update the sync record
    455455        // This saves us in the case where a page was ready to be deleted from the database but was just retained - so theres no need to delete it!
     
    471471
    472472    {
    473         MutexLocker locker(m_urlsToRetainOrReleaseLock);
     473        DeprecatedMutexLocker locker(m_urlsToRetainOrReleaseLock);
    474474        m_urlsToRelease.add(pageURL.isolatedCopy());
    475475        m_retainOrReleaseIconRequested = true;
     
    507507
    508508    {
    509         MutexLocker locker(m_pendingReadingLock);
     509        DeprecatedMutexLocker locker(m_pendingReadingLock);
    510510       
    511511        // Since this pageURL is going away, there's no reason anyone would ever be interested in its read results   
     
    523523    // Mark stuff for deletion from the database only if we're not in private browsing
    524524    if (!m_privateBrowsingEnabled) {
    525         MutexLocker locker(m_pendingSyncLock);
     525        DeprecatedMutexLocker locker(m_pendingSyncLock);
    526526        m_pageURLsPendingSync.set(pageURLOriginal.isolatedCopy(), pageRecord->snapshot(true));
    527527   
     
    549549    Vector<String> pageURLs;
    550550    {
    551         MutexLocker locker(m_urlAndIconLock);
     551        DeprecatedMutexLocker locker(m_urlAndIconLock);
    552552   
    553553        // If this icon was pending a read, remove it from that set because this new data should override what is on disk
    554554        RefPtr<IconRecord> icon = m_iconURLToRecordMap.get(iconURL);
    555555        if (icon) {
    556             MutexLocker locker(m_pendingReadingLock);
     556            DeprecatedMutexLocker locker(m_pendingReadingLock);
    557557            m_iconsPendingReading.remove(icon.get());
    558558        } else
     
    568568        // Mark the IconRecord as requiring an update to the database only if private browsing is disabled
    569569        if (!m_privateBrowsingEnabled) {
    570             MutexLocker locker(m_pendingSyncLock);
     570            DeprecatedMutexLocker locker(m_pendingSyncLock);
    571571            m_iconsPendingSync.set(iconURL, icon->snapshot());
    572572        }
     
    609609   
    610610    {
    611         MutexLocker locker(m_urlAndIconLock);
     611        DeprecatedMutexLocker locker(m_urlAndIconLock);
    612612
    613613        PageURLRecord* pageRecord = m_pageURLToRecordMap.get(pageURLOriginal);
     
    637637            LOG(IconDatabase, "Icon for icon url %s is about to be destroyed - removing mapping for it", urlForLogging(iconRecord->iconURL()).ascii().data());
    638638            m_iconURLToRecordMap.remove(iconRecord->iconURL());
    639             MutexLocker locker(m_pendingReadingLock);
     639            DeprecatedMutexLocker locker(m_pendingReadingLock);
    640640            m_iconsPendingReading.remove(iconRecord.get());
    641641        }
     
    643643        // And mark this mapping to be added to the database
    644644        if (!m_privateBrowsingEnabled) {
    645             MutexLocker locker(m_pendingSyncLock);
     645            DeprecatedMutexLocker locker(m_pendingSyncLock);
    646646            m_pageURLsPendingSync.set(pageURL, pageRecord->snapshot());
    647647           
     
    675675    // 2 - When we get a new icon from the loader, in which case the timestamp is set at that time
    676676    {
    677         MutexLocker locker(m_urlAndIconLock);
     677        DeprecatedMutexLocker locker(m_urlAndIconLock);
    678678        if (IconRecord* icon = m_iconURLToRecordMap.get(iconURL)) {
    679679            LOG(IconDatabase, "Found expiration time on a present icon based on existing IconRecord");
     
    683683   
    684684    // If we don't have a record for it, but we *have* imported all iconURLs from disk, then we should load it now
    685     MutexLocker readingLocker(m_pendingReadingLock);
     685    DeprecatedMutexLocker readingLocker(m_pendingReadingLock);
    686686    if (m_iconURLImportComplete)
    687687        return IconLoadYes;
     
    700700    ASSERT_NOT_SYNC_THREAD();
    701701   
    702     MutexLocker locker(m_urlAndIconLock);
     702    DeprecatedMutexLocker locker(m_urlAndIconLock);
    703703    if (IconRecord* icon = m_iconURLToRecordMap.get(iconURL))
    704704        return icon->imageDataStatus() != ImageDataStatusUnknown;
     
    755755size_t IconDatabase::pageURLMappingCount()
    756756{
    757     MutexLocker locker(m_urlAndIconLock);
     757    DeprecatedMutexLocker locker(m_urlAndIconLock);
    758758    return m_pageURLToRecordMap.size();
    759759}
     
    761761size_t IconDatabase::retainedPageURLCount()
    762762{
    763     MutexLocker locker(m_urlAndIconLock);
     763    DeprecatedMutexLocker locker(m_urlAndIconLock);
    764764    performPendingRetainAndReleaseOperations();
    765765    return m_retainedPageURLs.size();
     
    768768size_t IconDatabase::iconRecordCount()
    769769{
    770     MutexLocker locker(m_urlAndIconLock);
     770    DeprecatedMutexLocker locker(m_urlAndIconLock);
    771771    return m_iconURLToRecordMap.size();
    772772}
     
    774774size_t IconDatabase::iconRecordCountWithData()
    775775{
    776     MutexLocker locker(m_urlAndIconLock);
     776    DeprecatedMutexLocker locker(m_urlAndIconLock);
    777777    size_t result = 0;
    778778   
     
    830830void IconDatabase::wakeSyncThread()
    831831{
    832     MutexLocker locker(m_syncLock);
     832    DeprecatedMutexLocker locker(m_syncLock);
    833833
    834834    if (!m_disableSuddenTerminationWhileSyncThreadHasWorkToDo)
     
    875875bool IconDatabase::isOpenBesidesMainThreadCallbacks() const
    876876{
    877     MutexLocker locker(m_syncLock);
     877    DeprecatedMutexLocker locker(m_syncLock);
    878878    return m_syncThreadRunning || m_syncDB.isOpen();
    879879}
     
    881881String IconDatabase::databasePath() const
    882882{
    883     MutexLocker locker(m_syncLock);
     883    DeprecatedMutexLocker locker(m_syncLock);
    884884    return m_completeDatabasePath.isolatedCopy();
    885885}
     
    917917    PageURLRecord* pageRecord = m_pageURLToRecordMap.get(pageURL);
    918918   
    919     MutexLocker locker(m_pendingReadingLock);
     919    DeprecatedMutexLocker locker(m_pendingReadingLock);
    920920    if (!m_iconURLImportComplete) {
    921921        // If the initial import of all URLs hasn't completed and we have no page record, we assume we *might* know about this later and create a record for it
     
    986986   
    987987    {
    988         MutexLocker locker(m_syncLock);
     988        DeprecatedMutexLocker locker(m_syncLock);
    989989        if (!m_syncDB.open(m_completeDatabasePath)) {
    990990            LOG_ERROR("Unable to open icon database at path %s - %s", m_completeDatabasePath.ascii().data(), m_syncDB.lastErrorMsg());
     
    11141114           
    11151115            {
    1116                 MutexLocker locker(m_syncLock);
     1116                DeprecatedMutexLocker locker(m_syncLock);
    11171117                // Should've been consumed by SQLite, delete just to make sure we don't see it again in the future;
    11181118                deleteFile(m_completeDatabasePath + "-journal");
     
    12161216
    12171217        {
    1218             MutexLocker locker(m_urlAndIconLock);
     1218            DeprecatedMutexLocker locker(m_urlAndIconLock);
    12191219
    12201220            PageURLRecord* pageRecord = m_pageURLToRecordMap.get(pageURL);
     
    12491249        // Note that WebIconDatabase is not neccessarily API so we might be able to make this change
    12501250        {
    1251             MutexLocker locker(m_pendingReadingLock);
     1251            DeprecatedMutexLocker locker(m_pendingReadingLock);
    12521252            if (m_pageURLsPendingImport.contains(pageURL)) {
    12531253                dispatchDidImportIconURLForPageURLOnMainThread(pageURL);
     
    12721272    Vector<String> urls;
    12731273    {
    1274         MutexLocker locker(m_pendingReadingLock);
     1274        DeprecatedMutexLocker locker(m_pendingReadingLock);
    12751275
    12761276        urls.appendRange(m_pageURLsPendingImport.begin(), m_pageURLsPendingImport.end());
     
    12851285    // Keep a set of ones that are retained and pending notification
    12861286    {
    1287         MutexLocker locker(m_urlAndIconLock);
     1287        DeprecatedMutexLocker locker(m_urlAndIconLock);
    12881288
    12891289        performPendingRetainAndReleaseOperations();
     
    13021302                       
    13031303                        {
    1304                             MutexLocker locker(m_pendingReadingLock);
     1304                            DeprecatedMutexLocker locker(m_pendingReadingLock);
    13051305                            m_pageURLsInterestedInIcons.remove(urls[i]);
    13061306                            m_iconsPendingReading.remove(iconRecord);
    13071307                        }
    13081308                        {
    1309                             MutexLocker locker(m_pendingSyncLock);
     1309                            DeprecatedMutexLocker locker(m_pendingSyncLock);
    13101310                            m_iconsPendingSync.set(iconRecord->iconURL(), iconRecord->snapshot(true));                   
    13111311                        }
     
    13721372
    13731373        {
    1374             MutexLocker locker(m_urlAndIconLock);
     1374            DeprecatedMutexLocker locker(m_urlAndIconLock);
    13751375            performPendingRetainAndReleaseOperations();
    13761376        }
     
    14521452
    14531453    {
    1454         MutexLocker pendingWorkLocker(m_urlsToRetainOrReleaseLock);
     1454        DeprecatedMutexLocker pendingWorkLocker(m_urlsToRetainOrReleaseLock);
    14551455        if (!m_retainOrReleaseIconRequested)
    14561456            return;
     
    14891489    Vector<IconRecord*> icons;
    14901490    {
    1491         MutexLocker locker(m_pendingReadingLock);
     1491        DeprecatedMutexLocker locker(m_pendingReadingLock);
    14921492        icons.appendRange(m_iconsPendingReading.begin(), m_iconsPendingReading.end());
    14931493    }
     
    15021502        // Verify this icon still wants to be read from disk
    15031503        {
    1504             MutexLocker urlLocker(m_urlAndIconLock);
     1504            DeprecatedMutexLocker urlLocker(m_urlAndIconLock);
    15051505            {
    1506                 MutexLocker readLocker(m_pendingReadingLock);
     1506                DeprecatedMutexLocker readLocker(m_pendingReadingLock);
    15071507               
    15081508                if (m_iconsPendingReading.contains(icons[i])) {
     
    15921592    // asked for by the database on the main thread
    15931593    {
    1594         MutexLocker locker(m_urlAndIconLock);
     1594        DeprecatedMutexLocker locker(m_urlAndIconLock);
    15951595        Vector<IconSnapshot> iconSnapshots;
    15961596        Vector<PageURLSnapshot> pageSnapshots;
    15971597        {
    1598             MutexLocker locker(m_pendingSyncLock);
     1598            DeprecatedMutexLocker locker(m_pendingSyncLock);
    15991599
    16001600            iconSnapshots.appendRange(m_iconsPendingSync.begin().values(), m_iconsPendingSync.end().values());
     
    16591659    int result;
    16601660    while ((result = pageSQL.step()) == SQLITE_ROW) {
    1661         MutexLocker locker(m_urlAndIconLock);
     1661        DeprecatedMutexLocker locker(m_urlAndIconLock);
    16621662        if (!m_pageURLToRecordMap.contains(pageSQL.getColumnText(1)))
    16631663            pageIDsToDelete.append(pageSQL.getColumnInt64(0));
     
    17921792   
    17931793    // Close the database
    1794     MutexLocker locker(m_syncLock);
     1794    DeprecatedMutexLocker locker(m_syncLock);
    17951795   
    17961796    m_databaseDirectory = String();
  • trunk/Source/WebCore/loader/icon/IconDatabase.h

    r180301 r187972  
    142142    bool m_privateBrowsingEnabled;
    143143
    144     mutable Mutex m_syncLock;
     144    mutable DeprecatedMutex m_syncLock;
    145145    ThreadCondition m_syncCondition;
    146146    String m_databaseDirectory;
     
    154154    std::unique_ptr<SuddenTerminationDisabler> m_disableSuddenTerminationWhileSyncThreadHasWorkToDo;
    155155
    156     Mutex m_urlAndIconLock;
     156    DeprecatedMutex m_urlAndIconLock;
    157157    // Holding m_urlAndIconLock is required when accessing any of the following data structures or the objects they contain
    158158    HashMap<String, IconRecord*> m_iconURLToRecordMap;
     
    160160    HashSet<String> m_retainedPageURLs;
    161161
    162     Mutex m_pendingSyncLock;
     162    DeprecatedMutex m_pendingSyncLock;
    163163    // Holding m_pendingSyncLock is required when accessing any of the following data structures
    164164    HashMap<String, PageURLSnapshot> m_pageURLsPendingSync;
    165165    HashMap<String, IconSnapshot> m_iconsPendingSync;
    166166   
    167     Mutex m_pendingReadingLock;   
     167    DeprecatedMutex m_pendingReadingLock;   
    168168    // Holding m_pendingSyncLock is required when accessing any of the following data structures - when dealing with IconRecord*s, holding m_urlAndIconLock is also required
    169169    HashSet<String> m_pageURLsPendingImport;
     
    171171    HashSet<IconRecord*> m_iconsPendingReading;
    172172
    173     Mutex m_urlsToRetainOrReleaseLock;
     173    DeprecatedMutex m_urlsToRetainOrReleaseLock;
    174174    // Holding m_urlsToRetainOrReleaseLock is required when accessing any of the following data structures.
    175175    HashCountedSet<String> m_urlsToRetain;
  • trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp

    r184596 r187972  
    5050{
    5151    // This method is invoked by the event handling thread
    52     MutexLocker lock(m_mutex);
     52    DeprecatedMutexLocker lock(m_mutex);
    5353
    5454    bool shouldSetLatch = wheelEvent.shouldConsiderLatching();
     
    116116            || rootNode->hasChangedProperty(ScrollingStateFrameScrollingNode::NonFastScrollableRegion)
    117117            || rootNode->hasChangedProperty(ScrollingStateNode::ScrollLayer))) {
    118         MutexLocker lock(m_mutex);
     118        DeprecatedMutexLocker lock(m_mutex);
    119119
    120120        if (rootStateNodeChanged || rootNode->hasChangedProperty(ScrollingStateNode::ScrollLayer))
     
    209209void ScrollingTree::setMainFramePinState(bool pinnedToTheLeft, bool pinnedToTheRight, bool pinnedToTheTop, bool pinnedToTheBottom)
    210210{
    211     MutexLocker locker(m_swipeStateMutex);
     211    DeprecatedMutexLocker locker(m_swipeStateMutex);
    212212
    213213    m_mainFramePinnedToTheLeft = pinnedToTheLeft;
     
    219219FloatPoint ScrollingTree::mainFrameScrollPosition()
    220220{
    221     MutexLocker lock(m_mutex);
     221    DeprecatedMutexLocker lock(m_mutex);
    222222    return m_mainFrameScrollPosition;
    223223}
     
    225225void ScrollingTree::setMainFrameScrollPosition(FloatPoint position)
    226226{
    227     MutexLocker lock(m_mutex);
     227    DeprecatedMutexLocker lock(m_mutex);
    228228    m_mainFrameScrollPosition = position;
    229229}
     
    231231bool ScrollingTree::isPointInNonFastScrollableRegion(IntPoint p)
    232232{
    233     MutexLocker lock(m_mutex);
     233    DeprecatedMutexLocker lock(m_mutex);
    234234   
    235235    return m_nonFastScrollableRegion.contains(p);
     
    238238bool ScrollingTree::isRubberBandInProgress()
    239239{
    240     MutexLocker lock(m_mutex);   
     240    DeprecatedMutexLocker lock(m_mutex);   
    241241
    242242    return m_mainFrameIsRubberBanding;
     
    245245void ScrollingTree::setMainFrameIsRubberBanding(bool isRubberBanding)
    246246{
    247     MutexLocker locker(m_mutex);
     247    DeprecatedMutexLocker locker(m_mutex);
    248248
    249249    m_mainFrameIsRubberBanding = isRubberBanding;
     
    252252bool ScrollingTree::isScrollSnapInProgress()
    253253{
    254     MutexLocker lock(m_mutex);
     254    DeprecatedMutexLocker lock(m_mutex);
    255255   
    256256    return m_mainFrameIsScrollSnapping;
     
    259259void ScrollingTree::setMainFrameIsScrollSnapping(bool isScrollSnapping)
    260260{
    261     MutexLocker locker(m_mutex);
     261    DeprecatedMutexLocker locker(m_mutex);
    262262   
    263263    m_mainFrameIsScrollSnapping = isScrollSnapping;
     
    266266void ScrollingTree::setCanRubberBandState(bool canRubberBandAtLeft, bool canRubberBandAtRight, bool canRubberBandAtTop, bool canRubberBandAtBottom)
    267267{
    268     MutexLocker locker(m_swipeStateMutex);
     268    DeprecatedMutexLocker locker(m_swipeStateMutex);
    269269
    270270    m_rubberBandsAtLeft = canRubberBandAtLeft;
     
    276276bool ScrollingTree::rubberBandsAtLeft()
    277277{
    278     MutexLocker lock(m_swipeStateMutex);
     278    DeprecatedMutexLocker lock(m_swipeStateMutex);
    279279
    280280    return m_rubberBandsAtLeft;
     
    283283bool ScrollingTree::rubberBandsAtRight()
    284284{
    285     MutexLocker lock(m_swipeStateMutex);
     285    DeprecatedMutexLocker lock(m_swipeStateMutex);
    286286
    287287    return m_rubberBandsAtRight;
     
    290290bool ScrollingTree::rubberBandsAtBottom()
    291291{
    292     MutexLocker lock(m_swipeStateMutex);
     292    DeprecatedMutexLocker lock(m_swipeStateMutex);
    293293
    294294    return m_rubberBandsAtBottom;
     
    297297bool ScrollingTree::rubberBandsAtTop()
    298298{
    299     MutexLocker lock(m_swipeStateMutex);
     299    DeprecatedMutexLocker lock(m_swipeStateMutex);
    300300
    301301    return m_rubberBandsAtTop;
     
    309309void ScrollingTree::setScrollPinningBehavior(ScrollPinningBehavior pinning)
    310310{
    311     MutexLocker locker(m_swipeStateMutex);
     311    DeprecatedMutexLocker locker(m_swipeStateMutex);
    312312   
    313313    m_scrollPinningBehavior = pinning;
     
    316316ScrollPinningBehavior ScrollingTree::scrollPinningBehavior()
    317317{
    318     MutexLocker lock(m_swipeStateMutex);
     318    DeprecatedMutexLocker lock(m_swipeStateMutex);
    319319   
    320320    return m_scrollPinningBehavior;
     
    326326        return false;
    327327
    328     MutexLocker lock(m_swipeStateMutex);
     328    DeprecatedMutexLocker lock(m_swipeStateMutex);
    329329
    330330    if (wheelEvent.deltaX() > 0 && m_mainFramePinnedToTheLeft && !m_rubberBandsAtLeft)
     
    352352ScrollingNodeID ScrollingTree::latchedNode()
    353353{
    354     MutexLocker locker(m_mutex);
     354    DeprecatedMutexLocker locker(m_mutex);
    355355    return m_latchedNode;
    356356}
     
    358358void ScrollingTree::setLatchedNode(ScrollingNodeID node)
    359359{
    360     MutexLocker locker(m_mutex);
     360    DeprecatedMutexLocker locker(m_mutex);
    361361    m_latchedNode = node;
    362362}
     
    364364void ScrollingTree::clearLatchedNode()
    365365{
    366     MutexLocker locker(m_mutex);
     366    DeprecatedMutexLocker locker(m_mutex);
    367367    m_latchedNode = 0;
    368368}
  • trunk/Source/WebCore/page/scrolling/ScrollingTree.h

    r185762 r187972  
    161161    ScrollingTreeNodeMap m_nodeMap;
    162162
    163     Mutex m_mutex;
     163    DeprecatedMutex m_mutex;
    164164    Region m_nonFastScrollableRegion;
    165165    FloatPoint m_mainFrameScrollPosition;
    166166
    167     Mutex m_swipeStateMutex;
     167    DeprecatedMutex m_swipeStateMutex;
    168168    ScrollPinningBehavior m_scrollPinningBehavior { DoNotPin };
    169169    ScrollingNodeID m_latchedNode { 0 };
  • trunk/Source/WebCore/platform/MemoryPressureHandler.h

    r185206 r187972  
    138138    void (^m_releaseMemoryBlock)();
    139139    CFRunLoopObserverRef m_observer;
    140     Mutex m_observerMutex;
     140    DeprecatedMutex m_observerMutex;
    141141#elif OS(LINUX)
    142142    int m_eventFD;
  • trunk/Source/WebCore/platform/audio/HRTFDatabaseLoader.cpp

    r176259 r187972  
    103103    ASSERT(isMainThread());
    104104
    105     MutexLocker locker(m_threadLock);
     105    DeprecatedMutexLocker locker(m_threadLock);
    106106   
    107107    if (!m_hrtfDatabase.get() && !m_databaseLoaderThread) {
     
    118118void HRTFDatabaseLoader::waitForLoaderThreadCompletion()
    119119{
    120     MutexLocker locker(m_threadLock);
     120    DeprecatedMutexLocker locker(m_threadLock);
    121121   
    122122    // waitForThreadCompletion() should not be called twice for the same thread.
  • trunk/Source/WebCore/platform/audio/HRTFDatabaseLoader.h

    r165676 r187972  
    7777
    7878    // Holding a m_threadLock is required when accessing m_databaseLoaderThread.
    79     Mutex m_threadLock;
     79    DeprecatedMutex m_threadLock;
    8080    ThreadIdentifier m_databaseLoaderThread;
    8181
  • trunk/Source/WebCore/platform/cocoa/MemoryPressureHandlerCocoa.mm

    r186075 r187972  
    257257
    258258    {
    259         MutexLocker locker(m_observerMutex);
     259        DeprecatedMutexLocker locker(m_observerMutex);
    260260        if (!m_observer) {
    261261            m_observer = CFRunLoopObserverCreate(NULL, kCFRunLoopBeforeWaiting | kCFRunLoopExit, NO /* don't repeat */,
     
    273273
    274274    {
    275         MutexLocker locker(m_observerMutex);
     275        DeprecatedMutexLocker locker(m_observerMutex);
    276276        m_memoryPressureReason = MemoryPressureReasonNone;
    277277    }
     
    280280bool MemoryPressureHandler::shouldWaitForMemoryClearMessage()
    281281{
    282     MutexLocker locker(m_observerMutex);
     282    DeprecatedMutexLocker locker(m_observerMutex);
    283283    return m_memoryPressureReason & MemoryPressureReasonVMStatus;
    284284}
     
    289289
    290290    {
    291         MutexLocker locker(m_observerMutex);
     291        DeprecatedMutexLocker locker(m_observerMutex);
    292292        m_observer = 0;
    293293    }
  • trunk/Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp

    r182985 r187972  
    9090
    9191    {
    92         MutexLocker lock(m_mutex);
     92        DeprecatedMutexLocker lock(m_mutex);
    9393        if (!m_scheduled)
    9494            ++m_unscheduledFireCount;
     
    122122
    123123    {
    124         MutexLocker lock(m_mutex);
     124        DeprecatedMutexLocker lock(m_mutex);
    125125        m_previousFrameDone = true;
    126126    }
  • trunk/Source/WebCore/platform/graphics/DisplayRefreshMonitor.h

    r182985 r187972  
    7373    void setMonotonicAnimationStartTime(double startTime) { m_monotonicAnimationStartTime = startTime; }
    7474
    75     Mutex& mutex() { return m_mutex; }
     75    DeprecatedMutex& mutex() { return m_mutex; }
    7676
    7777    static RefPtr<DisplayRefreshMonitor> createDefaultDisplayRefreshMonitor(PlatformDisplayID);
     
    9090    int m_unscheduledFireCount; // Number of times the display link has fired with no clients.
    9191    PlatformDisplayID m_displayID;
    92     Mutex m_mutex;
     92    DeprecatedMutex m_mutex;
    9393
    9494    HashSet<DisplayRefreshMonitorClient*> m_clients;
  • trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp

    r185958 r187972  
    741741void MediaPlayerPrivateAVFoundation::setDelayCallbacks(bool delay) const
    742742{
    743     MutexLocker lock(m_queueMutex);
     743    DeprecatedMutexLocker lock(m_queueMutex);
    744744    if (delay)
    745745        ++m_delayCallbacks;
     
    760760void MediaPlayerPrivateAVFoundation::clearMainThreadPendingFlag()
    761761{
    762     MutexLocker lock(m_queueMutex);
     762    DeprecatedMutexLocker lock(m_queueMutex);
    763763    m_mainThreadCallPending = false;
    764764}
     
    826826    Notification notification = Notification();
    827827    {
    828         MutexLocker lock(m_queueMutex);
     828        DeprecatedMutexLocker lock(m_queueMutex);
    829829       
    830830        if (m_queuedNotifications.isEmpty())
  • trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h

    r187163 r187972  
    318318
    319319    Vector<Notification> m_queuedNotifications;
    320     mutable Mutex m_queueMutex;
     320    mutable DeprecatedMutex m_queueMutex;
    321321
    322322    mutable std::unique_ptr<PlatformTimeRanges> m_cachedLoadedTimeRanges;
  • trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp

    r186798 r187972  
    158158    inline void* callbackContext() const { return reinterpret_cast<void*>(m_objectID); }
    159159
    160     static Mutex& mapLock();
     160    static DeprecatedMutex& mapLock();
    161161    static HashMap<uintptr_t, AVFWrapper*>& map();
    162162    static AVFWrapper* avfWrapperForCallbackContext(void*);
     
    14041404}
    14051405
    1406 Mutex& AVFWrapper::mapLock()
    1407 {
    1408     static Mutex mapLock;
     1406DeprecatedMutex& AVFWrapper::mapLock()
     1407{
     1408    static DeprecatedMutex mapLock;
    14091409    return mapLock;
    14101410}
     
    14181418void AVFWrapper::addToMap()
    14191419{
    1420     MutexLocker locker(mapLock());
     1420    DeprecatedMutexLocker locker(mapLock());
    14211421   
    14221422    // HashMap doesn't like a key of 0, and also make sure we aren't
     
    14341434    LOG(Media, "AVFWrapper::removeFromMap(%p %d)", this, m_objectID);
    14351435
    1436     MutexLocker locker(mapLock());
     1436    DeprecatedMutexLocker locker(mapLock());
    14371437    map().remove(m_objectID);
    14381438}
     
    16351635void AVFWrapper::periodicTimeObserverCallback(AVCFPlayerRef, CMTime cmTime, void* context)
    16361636{
    1637     MutexLocker locker(mapLock());
     1637    DeprecatedMutexLocker locker(mapLock());
    16381638    AVFWrapper* self = avfWrapperForCallbackContext(context);
    16391639    if (!self) {
     
    16661666    std::unique_ptr<NotificationCallbackData> notificationData { static_cast<NotificationCallbackData*>(context) };
    16671667
    1668     MutexLocker locker(mapLock());
     1668    DeprecatedMutexLocker locker(mapLock());
    16691669    AVFWrapper* self = avfWrapperForCallbackContext(notificationData->m_context);
    16701670    if (!self) {
     
    17211721void AVFWrapper::loadPlayableCompletionCallback(AVCFAssetRef, void* context)
    17221722{
    1723     MutexLocker locker(mapLock());
     1723    DeprecatedMutexLocker locker(mapLock());
    17241724    AVFWrapper* self = avfWrapperForCallbackContext(context);
    17251725    if (!self) {
     
    17491749void AVFWrapper::loadMetadataCompletionCallback(AVCFAssetRef, void* context)
    17501750{
    1751     MutexLocker locker(mapLock());
     1751    DeprecatedMutexLocker locker(mapLock());
    17521752    AVFWrapper* self = avfWrapperForCallbackContext(context);
    17531753    if (!self) {
     
    17691769void AVFWrapper::seekCompletedCallback(AVCFPlayerItemRef, Boolean finished, void* context)
    17701770{
    1771     MutexLocker locker(mapLock());
     1771    DeprecatedMutexLocker locker(mapLock());
    17721772    AVFWrapper* self = avfWrapperForCallbackContext(context);
    17731773    if (!self) {
     
    18121812    std::unique_ptr<LegibleOutputData> legibleOutputData(reinterpret_cast<LegibleOutputData*>(context));
    18131813
    1814     MutexLocker locker(mapLock());
     1814    DeprecatedMutexLocker locker(mapLock());
    18151815    AVFWrapper* self = avfWrapperForCallbackContext(legibleOutputData->m_context);
    18161816    if (!self) {
     
    18281828{
    18291829    ASSERT(!isMainThread());
    1830     MutexLocker locker(mapLock());
     1830    DeprecatedMutexLocker locker(mapLock());
    18311831    AVFWrapper* self = avfWrapperForCallbackContext(context);
    18321832    if (!self) {
     
    18661866    std::unique_ptr<LoadRequestData> loadRequestData(reinterpret_cast<LoadRequestData*>(context));
    18671867
    1868     MutexLocker locker(mapLock());
     1868    DeprecatedMutexLocker locker(mapLock());
    18691869    AVFWrapper* self = avfWrapperForCallbackContext(loadRequestData->m_context);
    18701870    if (!self) {
     
    19221922{
    19231923    ASSERT(dispatch_get_main_queue() != dispatch_get_current_queue());
    1924     MutexLocker locker(mapLock());
     1924    DeprecatedMutexLocker locker(mapLock());
    19251925    AVFWrapper* self = avfWrapperForCallbackContext(context);
    19261926    if (!self) {
  • trunk/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp

    r166643 r187972  
    7878    m_sampleTimerHandler.cancel();
    7979    {
    80         MutexLocker lock(m_sampleMutex);
     80        DeprecatedMutexLocker lock(m_sampleMutex);
    8181        m_pendingSamples.append(sample);
    8282    }
     
    9393    Vector<GRefPtr<GstSample> > samples;
    9494    {
    95         MutexLocker lock(m_sampleMutex);
     95        DeprecatedMutexLocker lock(m_sampleMutex);
    9696        m_pendingSamples.swap(samples);
    9797    }
  • trunk/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h

    r185502 r187972  
    6868    Vector<GRefPtr<GstSample> > m_pendingSamples;
    6969    String m_streamId;
    70     Mutex m_sampleMutex;
     70    DeprecatedMutex m_sampleMutex;
    7171};
    7272
  • trunk/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp

    r185502 r187972  
    103103    g_object_get(m_pad.get(), "tags", &tags.outPtr(), NULL);
    104104    {
    105         MutexLocker lock(m_tagMutex);
     105        DeprecatedMutexLocker lock(m_tagMutex);
    106106        m_tags.swap(tags);
    107107    }
     
    159159    GRefPtr<GstTagList> tags;
    160160    {
    161         MutexLocker lock(m_tagMutex);
     161        DeprecatedMutexLocker lock(m_tagMutex);
    162162        tags.swap(m_tags);
    163163    }
  • trunk/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h

    r185502 r187972  
    7474    GThreadSafeMainLoopSource m_tagTimerHandler;
    7575
    76     Mutex m_tagMutex;
     76    DeprecatedMutex m_tagMutex;
    7777    GRefPtr<GstTagList> m_tags;
    7878};
  • trunk/Source/WebCore/platform/graphics/mac/DisplayRefreshMonitorMac.cpp

    r169299 r187972  
    8585    }
    8686
    87     MutexLocker lock(mutex());
     87    DeprecatedMutexLocker lock(mutex());
    8888    setIsScheduled(true);
    8989    return true;
     
    9292void DisplayRefreshMonitorMac::displayLinkFired(double nowSeconds, double outputTimeSeconds)
    9393{
    94     MutexLocker lock(mutex());
     94    DeprecatedMutexLocker lock(mutex());
    9595    if (!isPreviousFrameDone())
    9696        return;
  • trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp

    r182160 r187972  
    513513void MediaPlayerPrivateMediaFoundation::addListener(MediaPlayerListener* listener)
    514514{
    515     MutexLocker locker(m_mutexListeners);
     515    DeprecatedMutexLocker locker(m_mutexListeners);
    516516
    517517    m_listeners.add(listener);
     
    520520void MediaPlayerPrivateMediaFoundation::removeListener(MediaPlayerListener* listener)
    521521{
    522     MutexLocker locker(m_mutexListeners);
     522    DeprecatedMutexLocker locker(m_mutexListeners);
    523523
    524524    m_listeners.remove(listener);
     
    527527void MediaPlayerPrivateMediaFoundation::notifyDeleted()
    528528{
    529     MutexLocker locker(m_mutexListeners);
     529    DeprecatedMutexLocker locker(m_mutexListeners);
    530530
    531531    for (HashSet<MediaPlayerListener*>::const_iterator it = m_listeners.begin(); it != m_listeners.end(); ++it)
     
    705705HRESULT STDMETHODCALLTYPE MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke(__RPC__in_opt IMFAsyncResult *pAsyncResult)
    706706{
    707     MutexLocker locker(m_mutex);
     707    DeprecatedMutexLocker locker(m_mutex);
    708708
    709709    if (!m_mediaPlayer)
     
    720720void MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted()
    721721{
    722     MutexLocker locker(m_mutex);
     722    DeprecatedMutexLocker locker(m_mutex);
    723723
    724724    m_mediaPlayer = nullptr;
  • trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h

    r182160 r187972  
    9090    class MediaPlayerListener;
    9191    HashSet<MediaPlayerListener*> m_listeners;
    92     Mutex m_mutexListeners;
     92    DeprecatedMutex m_mutexListeners;
    9393
    9494    COMPtr<IMFMediaSession> m_mediaSession;
     
    150150        MediaPlayerPrivateMediaFoundation* m_mediaPlayer;
    151151        bool m_event;
    152         Mutex m_mutex;
     152        DeprecatedMutex m_mutex;
    153153    };
    154154
  • trunk/Source/WebCore/platform/ios/LegacyTileCache.h

    r185461 r187972  
    212212    float m_pendingZoomedOutScale;
    213213
    214     mutable Mutex m_tileMutex;
    215     mutable Mutex m_savedDisplayRectMutex;
    216     mutable Mutex m_contentReplacementImageMutex;
     214    mutable DeprecatedMutex m_tileMutex;
     215    mutable DeprecatedMutex m_savedDisplayRectMutex;
     216    mutable DeprecatedMutex m_contentReplacementImageMutex;
    217217
    218218    bool m_tileControllerShouldUseLowScaleTiles;
  • trunk/Source/WebCore/platform/ios/LegacyTileCache.mm

    r185461 r187972  
    148148        return;
    149149
    150     MutexLocker locker(m_tileMutex);
     150    DeprecatedMutexLocker locker(m_tileMutex);
    151151
    152152    m_tilesOpaque = opaque;
     
    161161        return;
    162162
    163     MutexLocker locker(m_tileMutex);
     163    DeprecatedMutexLocker locker(m_tileMutex);
    164164    LegacyTileGrid* activeGrid = activeTileGrid();
    165165    // Even though we aren't actually creating tiles in the inactive grid, we
     
    201201        // Tile invalidation is normally suspended during zooming by UIKit but some applications
    202202        // using custom scrollviews may zoom without triggering the callbacks. Invalidate the tiles explicitly.
    203         MutexLocker locker(m_tileMutex);
     203        DeprecatedMutexLocker locker(m_tileMutex);
    204204        activeTileGrid()->dropAllTiles();
    205205        activeTileGrid()->createTiles(CoverVisibleOnly);
     
    226226    ASSERT(m_tilingMode != Disabled);
    227227   
    228     MutexLocker locker(m_tileMutex);
     228    DeprecatedMutexLocker locker(m_tileMutex);
    229229
    230230    if (m_pendingZoomedOutScale) {
     
    315315        m_tilingMode = Minimal;
    316316
    317     MutexLocker locker(m_tileMutex);
     317    DeprecatedMutexLocker locker(m_tileMutex);
    318318    LegacyTileGrid* activeGrid = activeTileGrid();
    319319    if (activeGrid->checkDoSingleTileLayout()) {
     
    328328{
    329329    ASSERT(WebThreadIsLockedOrDisabled());
    330     MutexLocker locker(m_tileMutex);
     330    DeprecatedMutexLocker locker(m_tileMutex);
    331331
    332332    activeTileGrid()->addTilesCoveringRect(rect);
     
    335335void LegacyTileCache::removeAllNonVisibleTiles()
    336336{
    337     MutexLocker locker(m_tileMutex);
     337    DeprecatedMutexLocker locker(m_tileMutex);
    338338    removeAllNonVisibleTilesInternal();
    339339}
     
    357357void LegacyTileCache::removeAllTiles()
    358358{
    359     MutexLocker locker(m_tileMutex);
     359    DeprecatedMutexLocker locker(m_tileMutex);
    360360    m_zoomedOutTileGrid->dropAllTiles();
    361361    if (m_zoomedInTileGrid)
     
    365365void LegacyTileCache::removeForegroundTiles()
    366366{
    367     MutexLocker locker(m_tileMutex);
     367    DeprecatedMutexLocker locker(m_tileMutex);
    368368    if (!keepsZoomedOutTiles())
    369369        m_zoomedOutTileGrid->dropAllTiles();
     
    374374void LegacyTileCache::setContentReplacementImage(RetainPtr<CGImageRef> contentReplacementImage)
    375375{
    376     MutexLocker locker(m_contentReplacementImageMutex);
     376    DeprecatedMutexLocker locker(m_contentReplacementImageMutex);
    377377    m_contentReplacementImage = contentReplacementImage;
    378378}
     
    380380RetainPtr<CGImageRef> LegacyTileCache::contentReplacementImage() const
    381381{
    382     MutexLocker locker(m_contentReplacementImageMutex);
     382    DeprecatedMutexLocker locker(m_contentReplacementImageMutex);
    383383    return m_contentReplacementImage;
    384384}
     
    427427    if (isTileCreationSuspended())
    428428        return;
    429     MutexLocker locker(m_tileMutex);
     429    DeprecatedMutexLocker locker(m_tileMutex);
    430430    createTilesInActiveGrid(CoverSpeculative);
    431431}
     
    621621void LegacyTileCache::setNeedsDisplayInRect(const IntRect& dirtyRect)
    622622{
    623     MutexLocker locker(m_savedDisplayRectMutex);
     623    DeprecatedMutexLocker locker(m_savedDisplayRectMutex);
    624624    bool addedFirstRect = m_savedDisplayRects.isEmpty();
    625625    m_savedDisplayRects.append(dirtyRect);
     
    693693            return;
    694694
    695         MutexLocker locker(m_tileMutex);
     695        DeprecatedMutexLocker locker(m_tileMutex);
    696696        createTilesInActiveGrid(CoverVisibleOnly);
    697697
     
    711711        commitScaleChange();
    712712    else if (wasZooming) {
    713         MutexLocker locker(m_tileMutex);
     713        DeprecatedMutexLocker locker(m_tileMutex);
    714714        bringActiveTileGridToFront();
    715715    }
     
    754754    if (isTileInvalidationSuspended())
    755755        return;
    756     MutexLocker locker(m_tileMutex);
     756    DeprecatedMutexLocker locker(m_tileMutex);
    757757    flushSavedDisplayRects();
    758758}
     
    765765    Vector<IntRect> rects;
    766766    {
    767         MutexLocker locker(m_savedDisplayRectMutex);
     767        DeprecatedMutexLocker locker(m_savedDisplayRectMutex);
    768768        m_savedDisplayRects.swap(rects);
    769769    }
     
    793793
    794794    if (!m_savedDisplayRects.isEmpty()) {
    795         MutexLocker locker(m_tileMutex);
     795        DeprecatedMutexLocker locker(m_tileMutex);
    796796        flushSavedDisplayRects();
    797797    }
  • trunk/Source/WebCore/platform/ios/LegacyTileLayerPool.h

    r183234 r187972  
    7676    unsigned m_totalBytes;
    7777    unsigned m_capacity;
    78     Mutex m_layerPoolMutex;
     78    DeprecatedMutex m_layerPoolMutex;
    7979
    8080    double m_lastAddTime;
  • trunk/Source/WebCore/platform/ios/LegacyTileLayerPool.mm

    r180225 r187972  
    8585    }
    8686
    87     MutexLocker locker(m_layerPoolMutex);
     87    DeprecatedMutexLocker locker(m_layerPoolMutex);
    8888    listOfLayersWithSize(layerSize).prepend(layer);
    8989    m_totalBytes += bytesBackingLayerWithPixelSize(layerSize);
     
    9797    if (!canReuseLayerWithSize(size))
    9898        return nil;
    99     MutexLocker locker(m_layerPoolMutex);
     99    DeprecatedMutexLocker locker(m_layerPoolMutex);
    100100    LayerList& reuseList = listOfLayersWithSize(size, MarkAsUsed);
    101101    if (reuseList.isEmpty())
     
    107107void LegacyTileLayerPool::setCapacity(unsigned capacity)
    108108{
    109     MutexLocker reuseLocker(m_layerPoolMutex);
     109    DeprecatedMutexLocker reuseLocker(m_layerPoolMutex);
    110110    if (capacity < m_capacity)
    111111        schedulePrune();
     
    137137void LegacyTileLayerPool::prune()
    138138{
    139     MutexLocker locker(m_layerPoolMutex);
     139    DeprecatedMutexLocker locker(m_layerPoolMutex);
    140140    ASSERT(m_needsPrune);
    141141    m_needsPrune = false;
     
    164164void LegacyTileLayerPool::drain()
    165165{
    166     MutexLocker reuseLocker(m_layerPoolMutex);
     166    DeprecatedMutexLocker reuseLocker(m_layerPoolMutex);
    167167    m_reuseLists.clear();
    168168    m_sizesInPruneOrder.clear();
  • trunk/Source/WebCore/platform/network/curl/CurlDownload.cpp

    r187436 r187972  
    6161bool CurlDownloadManager::add(CURL* curlHandle)
    6262{
    63     MutexLocker locker(m_mutex);
     63    DeprecatedMutexLocker locker(m_mutex);
    6464
    6565    m_pendingHandleList.append(curlHandle);
     
    7171bool CurlDownloadManager::remove(CURL* curlHandle)
    7272{
    73     MutexLocker locker(m_mutex);
     73    DeprecatedMutexLocker locker(m_mutex);
    7474
    7575    m_removedHandleList.append(curlHandle);
     
    8080int CurlDownloadManager::getActiveDownloadCount() const
    8181{
    82     MutexLocker locker(m_mutex);
     82    DeprecatedMutexLocker locker(m_mutex);
    8383    return m_activeHandleList.size();
    8484}
     
    8686int CurlDownloadManager::getPendingDownloadCount() const
    8787{
    88     MutexLocker locker(m_mutex);
     88    DeprecatedMutexLocker locker(m_mutex);
    8989    return m_pendingHandleList.size();
    9090}
     
    112112void CurlDownloadManager::stopThreadIfIdle()
    113113{
    114     MutexLocker locker(m_mutex);
     114    DeprecatedMutexLocker locker(m_mutex);
    115115
    116116    if (!getActiveDownloadCount() && !getPendingDownloadCount())
     
    120120void CurlDownloadManager::updateHandleList()
    121121{
    122     MutexLocker locker(m_mutex);
     122    DeprecatedMutexLocker locker(m_mutex);
    123123
    124124    // Remove curl easy handles from multi list
     
    246246CurlDownload::~CurlDownload()
    247247{
    248     MutexLocker locker(m_mutex);
     248    DeprecatedMutexLocker locker(m_mutex);
    249249
    250250    if (m_url)
     
    263263        return;
    264264
    265     MutexLocker locker(m_mutex);
     265    DeprecatedMutexLocker locker(m_mutex);
    266266
    267267    m_curlHandle = curl_easy_init();
     
    296296        return;
    297297
    298     MutexLocker locker(m_mutex);
     298    DeprecatedMutexLocker locker(m_mutex);
    299299
    300300    URL url(ParsedURLString, request.url());
     
    318318String CurlDownload::getTempPath() const
    319319{
    320     MutexLocker locker(m_mutex);
     320    DeprecatedMutexLocker locker(m_mutex);
    321321    return m_tempPath;
    322322}
     
    324324String CurlDownload::getUrl() const
    325325{
    326     MutexLocker locker(m_mutex);
     326    DeprecatedMutexLocker locker(m_mutex);
    327327    return String(m_url);
    328328}
     
    330330ResourceResponse CurlDownload::getResponse() const
    331331{
    332     MutexLocker locker(m_mutex);
     332    DeprecatedMutexLocker locker(m_mutex);
    333333    return m_response;
    334334}
     
    336336void CurlDownload::closeFile()
    337337{
    338     MutexLocker locker(m_mutex);
     338    DeprecatedMutexLocker locker(m_mutex);
    339339
    340340    if (m_tempHandle != invalidPlatformFileHandle) {
     
    391391void CurlDownload::didReceiveHeader(const String& header)
    392392{
    393     MutexLocker locker(m_mutex);
     393    DeprecatedMutexLocker locker(m_mutex);
    394394
    395395    if (header == "\r\n" || header == "\n") {
     
    431431void CurlDownload::didReceiveData(void* data, int size)
    432432{
    433     MutexLocker locker(m_mutex);
     433    DeprecatedMutexLocker locker(m_mutex);
    434434
    435435    RefPtr<CurlDownload> protectedDownload(this);
     
    465465void CurlDownload::didFail()
    466466{
    467     MutexLocker locker(m_mutex);
     467    DeprecatedMutexLocker locker(m_mutex);
    468468
    469469    closeFile();
  • trunk/Source/WebCore/platform/network/curl/CurlDownload.h

    r187436 r187972  
    7474    Vector<CURL*> m_activeHandleList;
    7575    Vector<CURL*> m_removedHandleList;
    76     mutable Mutex m_mutex;
     76    mutable DeprecatedMutex m_mutex;
    7777    bool m_runThread;
    7878};
     
    141141    WebCore::ResourceResponse m_response;
    142142    bool m_deletesFileUponFailure;
    143     mutable Mutex m_mutex;
     143    mutable DeprecatedMutex m_mutex;
    144144    CurlDownloadListener *m_listener;
    145145
  • trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp

    r186476 r187972  
    134134}
    135135
    136 static Mutex* sharedResourceMutex(curl_lock_data data) {
    137     DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, cookieMutex, ());
    138     DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, dnsMutex, ());
    139     DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, shareMutex, ());
     136static DeprecatedMutex* sharedResourceMutex(curl_lock_data data)
     137{
     138    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, cookieMutex, ());
     139    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, dnsMutex, ());
     140    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, shareMutex, ());
    140141
    141142    switch (data) {
     
    191192static void curl_lock_callback(CURL* /* handle */, curl_lock_data data, curl_lock_access /* access */, void* /* userPtr */)
    192193{
    193     if (Mutex* mutex = sharedResourceMutex(data))
     194    if (DeprecatedMutex* mutex = sharedResourceMutex(data))
    194195        mutex->lock();
    195196}
     
    197198static void curl_unlock_callback(CURL* /* handle */, curl_lock_data data, void* /* userPtr */)
    198199{
    199     if (Mutex* mutex = sharedResourceMutex(data))
     200    if (DeprecatedMutex* mutex = sharedResourceMutex(data))
    200201        mutex->unlock();
    201202}
  • trunk/Source/WebCore/platform/network/ios/QuickLook.mm

    r183598 r187972  
    8686}
    8787
    88 static Mutex& qlPreviewConverterDictionaryMutex()
    89 {
    90     static NeverDestroyed<Mutex> mutex;
     88static DeprecatedMutex& qlPreviewConverterDictionaryMutex()
     89{
     90    static NeverDestroyed<DeprecatedMutex> mutex;
    9191    return mutex;
    9292}
     
    108108    ASSERT(url);
    109109    ASSERT(converter);
    110     MutexLocker lock(qlPreviewConverterDictionaryMutex());
     110    DeprecatedMutexLocker lock(qlPreviewConverterDictionaryMutex());
    111111    [QLPreviewConverterDictionary() setObject:converter forKey:url];
    112112    [QLContentDictionary() setObject:(fileName ? fileName : @"") forKey:url];
     
    122122    id converter = nil;
    123123    {
    124         MutexLocker lock(qlPreviewConverterDictionaryMutex());
     124        DeprecatedMutexLocker lock(qlPreviewConverterDictionaryMutex());
    125125        converter = [QLPreviewConverterDictionary() objectForKey:url];
    126126    }
     
    132132void WebCore::removeQLPreviewConverterForURL(NSURL *url)
    133133{
    134     MutexLocker lock(qlPreviewConverterDictionaryMutex());
     134    DeprecatedMutexLocker lock(qlPreviewConverterDictionaryMutex());
    135135    [QLPreviewConverterDictionary() removeObjectForKey:url];
    136136
     
    167167    NSURL *nsDocumentURL = documentURL;
    168168    {
    169         MutexLocker lock(qlPreviewConverterDictionaryMutex());
     169        DeprecatedMutexLocker lock(qlPreviewConverterDictionaryMutex());
    170170        converter = [QLPreviewConverterDictionary() objectForKey:nsDocumentURL];
    171171    }
  • trunk/Source/WebCore/platform/sql/SQLiteDatabase.cpp

    r185018 r187972  
    122122        sqlite3* db = m_db;
    123123        {
    124             MutexLocker locker(m_databaseClosingMutex);
     124            DeprecatedMutexLocker locker(m_databaseClosingMutex);
    125125            m_db = 0;
    126126        }
     
    153153    m_interrupted = true;
    154154    while (!m_lockingMutex.tryLock()) {
    155         MutexLocker locker(m_databaseClosingMutex);
     155        DeprecatedMutexLocker locker(m_databaseClosingMutex);
    156156        if (!m_db)
    157157            return;
     
    182182
    183183    {
    184         MutexLocker locker(m_authorizerLock);
     184        DeprecatedMutexLocker locker(m_authorizerLock);
    185185        enableAuthorizer(false);
    186186        SQLiteStatement statement(*this, ASCIILiteral("PRAGMA max_page_count"));
     
    202202    int64_t newMaxPageCount = currentPageSize ? size / currentPageSize : 0;
    203203   
    204     MutexLocker locker(m_authorizerLock);
     204    DeprecatedMutexLocker locker(m_authorizerLock);
    205205    enableAuthorizer(false);
    206206
     
    219219    // we can cache the value for future use
    220220    if (m_pageSize == -1) {
    221         MutexLocker locker(m_authorizerLock);
     221        DeprecatedMutexLocker locker(m_authorizerLock);
    222222        enableAuthorizer(false);
    223223       
     
    236236
    237237    {
    238         MutexLocker locker(m_authorizerLock);
     238        DeprecatedMutexLocker locker(m_authorizerLock);
    239239        enableAuthorizer(false);
    240240        // Note: freelist_count was added in SQLite 3.4.1.
     
    252252
    253253    {
    254         MutexLocker locker(m_authorizerLock);
     254        DeprecatedMutexLocker locker(m_authorizerLock);
    255255        enableAuthorizer(false);
    256256        SQLiteStatement statement(*this, ASCIILiteral("PRAGMA page_count"));
     
    331331int SQLiteDatabase::runIncrementalVacuumCommand()
    332332{
    333     MutexLocker locker(m_authorizerLock);
     333    DeprecatedMutexLocker locker(m_authorizerLock);
    334334    enableAuthorizer(false);
    335335
     
    472472    }
    473473
    474     MutexLocker locker(m_authorizerLock);
     474    DeprecatedMutexLocker locker(m_authorizerLock);
    475475
    476476    m_authorizer = auth;
  • trunk/Source/WebCore/platform/sql/SQLiteDatabase.h

    r185003 r187972  
    109109    void setAuthorizer(PassRefPtr<DatabaseAuthorizer>);
    110110
    111     Mutex& databaseMutex() { return m_lockingMutex; }
     111    DeprecatedMutex& databaseMutex() { return m_lockingMutex; }
    112112    bool isAutoCommitOn() const;
    113113
     
    150150    bool m_sharable;
    151151   
    152     Mutex m_authorizerLock;
     152    DeprecatedMutex m_authorizerLock;
    153153    RefPtr<DatabaseAuthorizer> m_authorizer;
    154154
    155     Mutex m_lockingMutex;
     155    DeprecatedMutex m_lockingMutex;
    156156    ThreadIdentifier m_openingThread;
    157157
    158     Mutex m_databaseClosingMutex;
     158    DeprecatedMutex m_databaseClosingMutex;
    159159    bool m_interrupted;
    160160
  • trunk/Source/WebCore/platform/sql/SQLiteStatement.cpp

    r182365 r187972  
    6060    ASSERT(!m_isPrepared);
    6161
    62     MutexLocker databaseLock(m_database.databaseMutex());
     62    DeprecatedMutexLocker databaseLock(m_database.databaseMutex());
    6363    if (m_database.isInterrupted())
    6464        return SQLITE_INTERRUPT;
     
    8989int SQLiteStatement::step()
    9090{
    91     MutexLocker databaseLock(m_database.databaseMutex());
     91    DeprecatedMutexLocker databaseLock(m_database.databaseMutex());
    9292    if (m_database.isInterrupted())
    9393        return SQLITE_INTERRUPT;
  • trunk/Source/WebCore/workers/WorkerThread.cpp

    r186279 r187972  
    123123{
    124124    // Mutex protection is necessary to ensure that m_threadID is initialized when the thread starts.
    125     MutexLocker lock(m_threadCreationMutex);
     125    DeprecatedMutexLocker lock(m_threadCreationMutex);
    126126
    127127    if (m_threadID)
     
    146146
    147147    {
    148         MutexLocker lock(m_threadCreationMutex);
     148        DeprecatedMutexLocker lock(m_threadCreationMutex);
    149149        m_workerGlobalScope = createWorkerGlobalScope(m_startupData->m_scriptURL, m_startupData->m_userAgent, m_startupData->m_contentSecurityPolicy, m_startupData->m_contentSecurityPolicyType, m_startupData->m_topOrigin.release());
    150150
     
    190190{
    191191    // Mutex protection is necessary because stop() can be called before the context is fully created.
    192     MutexLocker lock(m_threadCreationMutex);
     192    DeprecatedMutexLocker lock(m_threadCreationMutex);
    193193
    194194    // Ensure that tasks are being handled by thread event loop. If script execution weren't forbidden, a while(1) loop in JS could keep the thread alive forever.
  • trunk/Source/WebCore/workers/WorkerThread.h

    r177857 r187972  
    9090
    9191        RefPtr<WorkerGlobalScope> m_workerGlobalScope;
    92         Mutex m_threadCreationMutex;
     92        DeprecatedMutex m_threadCreationMutex;
    9393
    9494        std::unique_ptr<WorkerThreadStartupData> m_startupData;
  • trunk/Source/WebKit/ChangeLog

    r187866 r187972  
     12015-08-04  Filip Pizlo  <[email protected]>
     2
     3        Rename Mutex to DeprecatedMutex
     4        https://bugs.webkit.org/show_bug.cgi?id=147675
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * Storage/StorageAreaSync.cpp:
     9        (WebCore::StorageAreaSync::syncTimerFired):
     10        (WebCore::StorageAreaSync::markImported):
     11        (WebCore::StorageAreaSync::blockUntilImportComplete):
     12        (WebCore::StorageAreaSync::performSync):
     13        * Storage/StorageAreaSync.h:
     14        * Storage/StorageTracker.cpp:
     15        (WebCore::StorageTracker::setDatabaseDirectoryPath):
     16        (WebCore::StorageTracker::finishedImportingOriginIdentifiers):
     17        (WebCore::StorageTracker::syncImportOriginIdentifiers):
     18        (WebCore::StorageTracker::syncFileSystemAndTrackerDatabase):
     19        (WebCore::StorageTracker::setOriginDetails):
     20        (WebCore::StorageTracker::syncSetOriginDetails):
     21        (WebCore::StorageTracker::origins):
     22        (WebCore::StorageTracker::deleteAllOrigins):
     23        (WebCore::StorageTracker::syncDeleteAllOrigins):
     24        (WebCore::StorageTracker::deleteOrigin):
     25        (WebCore::StorageTracker::syncDeleteOrigin):
     26        (WebCore::StorageTracker::canDeleteOrigin):
     27        (WebCore::StorageTracker::cancelDeletingOrigin):
     28        (WebCore::StorageTracker::diskUsageForOrigin):
     29        * Storage/StorageTracker.h:
     30
    1312015-08-04  Alex Christensen  <[email protected]>
    232
  • trunk/Source/WebKit/Storage/StorageAreaSync.cpp

    r186279 r187972  
    165165    bool partialSync = false;
    166166    {
    167         MutexLocker locker(m_syncLock);
     167        DeprecatedMutexLocker locker(m_syncLock);
    168168
    169169        // Do not schedule another sync if we're still trying to complete the
     
    353353void StorageAreaSync::markImported()
    354354{
    355     MutexLocker locker(m_importLock);
     355    DeprecatedMutexLocker locker(m_importLock);
    356356    m_importComplete = true;
    357357    m_importCondition.signal();
     
    373373        return;
    374374
    375     MutexLocker locker(m_importLock);
     375    DeprecatedMutexLocker locker(m_importLock);
    376376    while (!m_importComplete)
    377377        m_importCondition.wait(m_importLock);
     
    468468    HashMap<String, String> items;
    469469    {
    470         MutexLocker locker(m_syncLock);
     470        DeprecatedMutexLocker locker(m_syncLock);
    471471
    472472        ASSERT(m_syncScheduled);
     
    483483
    484484    {
    485         MutexLocker locker(m_syncLock);
     485        DeprecatedMutexLocker locker(m_syncLock);
    486486        m_syncInProgress = false;
    487487    }
  • trunk/Source/WebKit/Storage/StorageAreaSync.h

    r177813 r187972  
    8686    const String m_databaseIdentifier;
    8787
    88     Mutex m_syncLock;
     88    DeprecatedMutex m_syncLock;
    8989    HashMap<String, String> m_itemsPendingSync;
    9090    bool m_clearItemsWhileSyncing;
     
    9595    bool m_syncCloseDatabase;
    9696
    97     mutable Mutex m_importLock;
     97    mutable DeprecatedMutex m_importLock;
    9898    ThreadCondition m_importCondition;
    9999    bool m_importComplete;
  • trunk/Source/WebKit/Storage/StorageTracker.cpp

    r182365 r187972  
    101101void StorageTracker::setDatabaseDirectoryPath(const String& path)
    102102{
    103     MutexLocker locker(m_databaseMutex);
     103    DeprecatedMutexLocker locker(m_databaseMutex);
    104104
    105105    if (m_database.isOpen())
     
    109109
    110110    {
    111         MutexLocker locker(m_originSetMutex);
     111        DeprecatedMutexLocker locker(m_originSetMutex);
    112112        m_originSet.clear();
    113113    }
     
    186186void StorageTracker::finishedImportingOriginIdentifiers()
    187187{
    188     MutexLocker locker(m_databaseMutex);
     188    DeprecatedMutexLocker locker(m_databaseMutex);
    189189    if (m_client)
    190190        m_client->didFinishLoadingOrigins();
     
    198198
    199199    {
    200         MutexLocker locker(m_databaseMutex);
     200        DeprecatedMutexLocker locker(m_databaseMutex);
    201201
    202202        // Don't force creation of StorageTracker's db just because a tracker
     
    218218           
    219219            {
    220                 MutexLocker lockOrigins(m_originSetMutex);
     220                DeprecatedMutexLocker lockOrigins(m_originSetMutex);
    221221                while ((result = statement.step()) == SQLITE_ROW)
    222222                    m_originSet.add(statement.getColumnText(0).isolatedCopy());
     
    233233   
    234234    {
    235         MutexLocker locker(m_clientMutex);
     235        DeprecatedMutexLocker locker(m_clientMutex);
    236236
    237237        if (m_client) {
    238             MutexLocker locker(m_originSetMutex);
     238            DeprecatedMutexLocker locker(m_originSetMutex);
    239239            OriginSet::const_iterator end = m_originSet.end();
    240240            for (OriginSet::const_iterator it = m_originSet.begin(); it != end; ++it)
     
    258258    Vector<String> paths;
    259259    {
    260         MutexLocker locker(m_databaseMutex);
     260        DeprecatedMutexLocker locker(m_databaseMutex);
    261261        paths = listDirectory(m_storageDirectoryPath, "*.localstorage");
    262262    }
     
    266266    OriginSet originSetCopy;
    267267    {
    268         MutexLocker locker(m_originSetMutex);
     268        DeprecatedMutexLocker locker(m_originSetMutex);
    269269        for (OriginSet::const_iterator it = m_originSet.begin(), end = m_originSet.end(); it != end; ++it)
    270270            originSetCopy.add((*it).isolatedCopy());
     
    307307
    308308    {
    309         MutexLocker locker(m_originSetMutex);
     309        DeprecatedMutexLocker locker(m_originSetMutex);
    310310
    311311        if (m_originSet.contains(originIdentifier))
     
    338338    SQLiteTransactionInProgressAutoCounter transactionCounter;
    339339
    340     MutexLocker locker(m_databaseMutex);
     340    DeprecatedMutexLocker locker(m_databaseMutex);
    341341
    342342    openTrackerDatabase(true);
     
    358358
    359359    {
    360         MutexLocker locker(m_originSetMutex);
     360        DeprecatedMutexLocker locker(m_originSetMutex);
    361361        if (!m_originSet.contains(originIdentifier))
    362362            m_originSet.add(originIdentifier);
     
    364364
    365365    {
    366         MutexLocker locker(m_clientMutex);
     366        DeprecatedMutexLocker locker(m_clientMutex);
    367367        if (m_client)
    368368            m_client->dispatchDidModifyOrigin(originIdentifier);
     
    377377        return;
    378378
    379     MutexLocker locker(m_originSetMutex);
     379    DeprecatedMutexLocker locker(m_originSetMutex);
    380380
    381381    for (OriginSet::const_iterator it = m_originSet.begin(), end = m_originSet.end(); it != end; ++it)
     
    393393
    394394    {
    395         MutexLocker locker(m_originSetMutex);
     395        DeprecatedMutexLocker locker(m_originSetMutex);
    396396        willDeleteAllOrigins();
    397397        m_originSet.clear();
     
    418418    SQLiteTransactionInProgressAutoCounter transactionCounter;
    419419   
    420     MutexLocker locker(m_databaseMutex);
     420    DeprecatedMutexLocker locker(m_databaseMutex);
    421421   
    422422    openTrackerDatabase(false);
     
    438438
    439439        {
    440             MutexLocker locker(m_clientMutex);
     440            DeprecatedMutexLocker locker(m_clientMutex);
    441441            if (m_client)
    442442                m_client->dispatchDidModifyOrigin(statement.getColumnText(0));
     
    500500   
    501501    {
    502         MutexLocker locker(m_originSetMutex);
     502        DeprecatedMutexLocker locker(m_originSetMutex);
    503503        willDeleteOrigin(originId);
    504504        m_originSet.remove(originId);
     
    517517    SQLiteTransactionInProgressAutoCounter transactionCounter;
    518518
    519     MutexLocker locker(m_databaseMutex);
     519    DeprecatedMutexLocker locker(m_databaseMutex);
    520520   
    521521    if (!canDeleteOrigin(originIdentifier)) {
     
    550550    bool shouldDeleteTrackerFiles = false;
    551551    {
    552         MutexLocker locker(m_originSetMutex);
     552        DeprecatedMutexLocker locker(m_originSetMutex);
    553553        m_originSet.remove(originIdentifier);
    554554        shouldDeleteTrackerFiles = m_originSet.isEmpty();
     
    567567
    568568    {
    569         MutexLocker locker(m_clientMutex);
     569        DeprecatedMutexLocker locker(m_clientMutex);
    570570        if (m_client)
    571571            m_client->dispatchDidModifyOrigin(originIdentifier);
     
    593593{
    594594    ASSERT(!m_databaseMutex.tryLock());
    595     MutexLocker locker(m_originSetMutex);
     595    DeprecatedMutexLocker locker(m_originSetMutex);
    596596    return m_originsBeingDeleted.contains(originIdentifier);
    597597}
     
    602602        return;
    603603
    604     MutexLocker locker(m_databaseMutex);
    605     {
    606         MutexLocker locker(m_originSetMutex);
     604    DeprecatedMutexLocker locker(m_databaseMutex);
     605    {
     606        DeprecatedMutexLocker locker(m_originSetMutex);
    607607        if (!m_originsBeingDeleted.isEmpty())
    608608            m_originsBeingDeleted.remove(originIdentifier);
     
    648648        return 0;
    649649
    650     MutexLocker locker(m_databaseMutex);
     650    DeprecatedMutexLocker locker(m_databaseMutex);
    651651
    652652    String path = databasePathForOrigin(origin->databaseIdentifier());
  • trunk/Source/WebKit/Storage/StorageTracker.h

    r177813 r187972  
    9696
    9797    // Mutex for m_database and m_storageDirectoryPath.
    98     Mutex m_databaseMutex;
     98    DeprecatedMutex m_databaseMutex;
    9999    SQLiteDatabase m_database;
    100100    String m_storageDirectoryPath;
    101101
    102     Mutex m_clientMutex;
     102    DeprecatedMutex m_clientMutex;
    103103    StorageTrackerClient* m_client;
    104104
    105105    // Guard for m_originSet and m_originsBeingDeleted.
    106     Mutex m_originSetMutex;
     106    DeprecatedMutex m_originSetMutex;
    107107    typedef HashSet<String> OriginSet;
    108108    OriginSet m_originSet;
  • trunk/Source/WebKit/ios/ChangeLog

    r187926 r187972  
     12015-08-04  Filip Pizlo  <[email protected]>
     2
     3        Rename Mutex to DeprecatedMutex
     4        https://bugs.webkit.org/show_bug.cgi?id=147675
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * WebCoreSupport/WebFixedPositionContent.mm:
     9        (WebFixedPositionContentDataLock):
     10        (-[WebFixedPositionContent scrollOrZoomChanged:]):
     11        (-[WebFixedPositionContent overflowScrollPositionForLayer:changedTo:]):
     12        (-[WebFixedPositionContent setViewportConstrainedLayers:stickyContainerMap:]):
     13        (-[WebFixedPositionContent hasFixedOrStickyPositionLayers]):
     14        (-[WebFixedPositionContent minimumOffsetFromFixedPositionLayersToAnchorEdge:ofRect:inLayer:]):
     15
    1162015-08-04  Anders Carlsson  <[email protected]>
    217
  • trunk/Source/WebKit/ios/WebCoreSupport/WebFixedPositionContent.mm

    r176140 r187972  
    4949using namespace std;
    5050
    51 static Mutex& WebFixedPositionContentDataLock()
    52 {
    53     DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, mutex, ());
     51static DeprecatedMutex& WebFixedPositionContentDataLock()
     52{
     53    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, mutex, ());
    5454    return mutex;
    5555}
     
    102102- (void)scrollOrZoomChanged:(CGRect)positionedObjectsRect
    103103{
    104     MutexLocker lock(WebFixedPositionContentDataLock());
     104    DeprecatedMutexLocker lock(WebFixedPositionContentDataLock());
    105105
    106106    LayerInfoMap::const_iterator end = _private->m_viewportConstrainedLayers.end();
     
    141141- (void)overflowScrollPositionForLayer:(CALayer *)scrollLayer changedTo:(CGPoint)scrollPosition
    142142{
    143     MutexLocker lock(WebFixedPositionContentDataLock());
     143    DeprecatedMutexLocker lock(WebFixedPositionContentDataLock());
    144144
    145145    LayerInfoMap::const_iterator end = _private->m_viewportConstrainedLayers.end();
     
    174174- (void)setViewportConstrainedLayers:(WTF::HashMap<CALayer *, std::unique_ptr<WebCore::ViewportConstraints>>&)layerMap stickyContainerMap:(WTF::HashMap<CALayer*, CALayer*>&)stickyContainers
    175175{
    176     MutexLocker lock(WebFixedPositionContentDataLock());
     176    DeprecatedMutexLocker lock(WebFixedPositionContentDataLock());
    177177
    178178    _private->m_viewportConstrainedLayers.clear();
     
    191191- (BOOL)hasFixedOrStickyPositionLayers
    192192{
    193     MutexLocker lock(WebFixedPositionContentDataLock());
     193    DeprecatedMutexLocker lock(WebFixedPositionContentDataLock());
    194194    return !_private->m_viewportConstrainedLayers.isEmpty();
    195195}
     
    211211- (CGFloat)minimumOffsetFromFixedPositionLayersToAnchorEdge:(WebFixedPositionAnchorEdge)anchorEdge ofRect:(CGRect)rect inLayer:(CALayer *)layer
    212212{
    213     MutexLocker lock(WebFixedPositionContentDataLock());
     213    DeprecatedMutexLocker lock(WebFixedPositionContentDataLock());
    214214    ViewportConstraints::AnchorEdgeFlags anchorEdgeFlags = anchorEdgeFlagsForAnchorEdge(anchorEdge);
    215215    CGFloat minimumOffset = CGFLOAT_MAX;
  • trunk/Source/WebKit/mac/ChangeLog

    r187926 r187972  
     12015-08-04  Filip Pizlo  <[email protected]>
     2
     3        Rename Mutex to DeprecatedMutex
     4        https://bugs.webkit.org/show_bug.cgi?id=147675
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * Storage/WebDatabaseManager.mm:
     9        (transactionBackgroundTaskIdentifierLock):
     10        (+[WebDatabaseManager startBackgroundTask]):
     11        (+[WebDatabaseManager endBackgroundTask]):
     12        * WebView/WebView.mm:
     13        (-[WebView _synchronizeCustomFixedPositionLayoutRect]):
     14        (-[WebView _setCustomFixedPositionLayoutRectInWebThread:synchronize:]):
     15        (-[WebView _setCustomFixedPositionLayoutRect:]):
     16        (-[WebView _fetchCustomFixedPositionLayoutRect:]):
     17        * WebView/WebViewData.h:
     18
    1192015-08-04  Anders Carlsson  <[email protected]>
    220
  • trunk/Source/WebKit/mac/Storage/WebDatabaseManager.mm

    r187926 r187972  
    227227@implementation WebDatabaseManager (WebDatabaseManagerInternal)
    228228
    229 static Mutex& transactionBackgroundTaskIdentifierLock()
    230 {
    231     DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, mutex, ());
     229static DeprecatedMutex& transactionBackgroundTaskIdentifierLock()
     230{
     231    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, mutex, ());
    232232    return mutex;
    233233}
     
    262262+ (void)startBackgroundTask
    263263{
    264     MutexLocker lock(transactionBackgroundTaskIdentifierLock());
     264    DeprecatedMutexLocker lock(transactionBackgroundTaskIdentifierLock());
    265265
    266266    // If there's already an existing background task going on, there's no need to start a new one.
     
    276276+ (void)endBackgroundTask
    277277{
    278     MutexLocker lock(transactionBackgroundTaskIdentifierLock());
     278    DeprecatedMutexLocker lock(transactionBackgroundTaskIdentifierLock());
    279279
    280280    // It is possible that we were unable to start the background task when the first transaction began.
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r186982 r187972  
    36333633    IntRect newRect;
    36343634    {
    3635         MutexLocker locker(_private->pendingFixedPositionLayoutRectMutex);
     3635        DeprecatedMutexLocker locker(_private->pendingFixedPositionLayoutRectMutex);
    36363636        if (CGRectIsNull(_private->pendingFixedPositionLayoutRect))
    36373637            return;
     
    36473647{
    36483648    {
    3649         MutexLocker locker(_private->pendingFixedPositionLayoutRectMutex);
     3649        DeprecatedMutexLocker locker(_private->pendingFixedPositionLayoutRectMutex);
    36503650        _private->pendingFixedPositionLayoutRect = rect;
    36513651    }
     
    36613661    ASSERT(WebThreadIsLocked());
    36623662    {
    3663         MutexLocker locker(_private->pendingFixedPositionLayoutRectMutex);
     3663        DeprecatedMutexLocker locker(_private->pendingFixedPositionLayoutRectMutex);
    36643664        _private->pendingFixedPositionLayoutRect = rect;
    36653665    }
     
    36693669- (BOOL)_fetchCustomFixedPositionLayoutRect:(NSRect*)rect
    36703670{
    3671     MutexLocker locker(_private->pendingFixedPositionLayoutRectMutex);
     3671    DeprecatedMutexLocker locker(_private->pendingFixedPositionLayoutRectMutex);
    36723672    if (CGRectIsNull(_private->pendingFixedPositionLayoutRect))
    36733673        return false;
  • trunk/Source/WebKit/mac/WebView/WebViewData.h

    r184780 r187972  
    250250    BOOL mainViewIsScrollingOrZooming;
    251251    int32_t didDrawTiles;
    252     WTF::Mutex pendingFixedPositionLayoutRectMutex;
     252    WTF::DeprecatedMutex pendingFixedPositionLayoutRectMutex;
    253253    CGRect pendingFixedPositionLayoutRect;
    254254#endif
  • trunk/Source/WebKit/win/ChangeLog

    r187908 r187972  
     12015-08-04  Filip Pizlo  <[email protected]>
     2
     3        Rename Mutex to DeprecatedMutex
     4        https://bugs.webkit.org/show_bug.cgi?id=147675
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * Plugins/PluginMainThreadScheduler.cpp:
     9        (WebCore::PluginMainThreadScheduler::scheduleCall):
     10        (WebCore::PluginMainThreadScheduler::registerPlugin):
     11        (WebCore::PluginMainThreadScheduler::unregisterPlugin):
     12        (WebCore::PluginMainThreadScheduler::dispatchCallsForPlugin):
     13        * Plugins/PluginMainThreadScheduler.h:
     14        * WebIconDatabase.cpp:
     15        (WebIconDatabase::didRemoveAllIcons):
     16        (WebIconDatabase::didImportIconURLForPageURL):
     17        (WebIconDatabase::deliverNotifications):
     18        * WebLocalizableStrings.cpp:
     19        (mainBundleLocStrings):
     20        (frameworkLocStringsMutex):
     21        (findCachedString):
     22        (cacheString):
     23
    1242015-08-04  Brent Fulgham  <[email protected]>
    225
  • trunk/Source/WebKit/win/Plugins/PluginMainThreadScheduler.cpp

    r185926 r187972  
    4343void PluginMainThreadScheduler::scheduleCall(NPP npp, MainThreadFunction function, void* userData)
    4444{
    45     MutexLocker lock(m_queueMutex);
     45    DeprecatedMutexLocker lock(m_queueMutex);
    4646
    4747    CallQueueMap::iterator it = m_callQueueMap.find(npp);
     
    5959void PluginMainThreadScheduler::registerPlugin(NPP npp)
    6060{
    61     MutexLocker lock(m_queueMutex);
     61    DeprecatedMutexLocker lock(m_queueMutex);
    6262
    6363    ASSERT(!m_callQueueMap.contains(npp));
     
    6767void PluginMainThreadScheduler::unregisterPlugin(NPP npp)
    6868{
    69     MutexLocker lock(m_queueMutex);
     69    DeprecatedMutexLocker lock(m_queueMutex);
    7070
    7171    ASSERT(m_callQueueMap.contains(npp));
     
    7878        // Check if the plug-in has been destroyed.
    7979        {
    80             MutexLocker lock(m_queueMutex);
     80            DeprecatedMutexLocker lock(m_queueMutex);
    8181            if (!m_callQueueMap.contains(npp))
    8282                return;
  • trunk/Source/WebKit/win/Plugins/PluginMainThreadScheduler.h

    r185926 r187972  
    8080    bool m_callPending;
    8181    CallQueueMap m_callQueueMap;
    82     Mutex m_queueMutex;
     82    DeprecatedMutex m_queueMutex;
    8383};
    8484
  • trunk/Source/WebKit/win/WebIconDatabase.cpp

    r176892 r187972  
    321321{
    322322    // Queueing the empty string is a special way of saying "this queued notification is the didRemoveAllIcons notification"
    323     MutexLocker locker(m_notificationMutex);
     323    DeprecatedMutexLocker locker(m_notificationMutex);
    324324    m_notificationQueue.append(String());
    325325    scheduleNotificationDelivery();
     
    328328void WebIconDatabase::didImportIconURLForPageURL(const WTF::String& pageURL)
    329329{
    330     MutexLocker locker(m_notificationMutex);
     330    DeprecatedMutexLocker locker(m_notificationMutex);
    331331    m_notificationQueue.append(pageURL.isolatedCopy());
    332332    scheduleNotificationDelivery();
     
    404404    Vector<String> queue;
    405405    {
    406         MutexLocker locker(m_sharedWebIconDatabase->m_notificationMutex);
     406        DeprecatedMutexLocker locker(m_sharedWebIconDatabase->m_notificationMutex);
    407407        queue.swap(m_sharedWebIconDatabase->m_notificationQueue);
    408408        m_sharedWebIconDatabase->m_deliveryRequested = false;
  • trunk/Source/WebKit/win/WebLocalizableStrings.cpp

    r176892 r187972  
    4545typedef HashMap<String, LocalizedString*> LocalizedStringMap;
    4646
    47 static Mutex& mainBundleLocStringsMutex()
    48 {
    49     DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, mutex, ());
     47static DeprecatedMutex& mainBundleLocStringsMutex()
     48{
     49    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, mutex, ());
    5050    return mutex;
    5151}
     
    5757}
    5858
    59 static Mutex& frameworkLocStringsMutex()
    60 {
    61     DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, mutex, ());
     59static DeprecatedMutex& frameworkLocStringsMutex()
     60{
     61    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, mutex, ());
    6262    return mutex;
    6363}
     
    176176{
    177177    if (!stringsBundle) {
    178         MutexLocker lock(mainBundleLocStringsMutex());
     178        DeprecatedMutexLocker lock(mainBundleLocStringsMutex());
    179179        return mainBundleLocStrings().get(key);
    180180    }
    181181
    182182    if (stringsBundle->bundle == WebKitLocalizableStringsBundle.bundle) {
    183         MutexLocker lock(frameworkLocStringsMutex());
     183        DeprecatedMutexLocker lock(frameworkLocStringsMutex());
    184184        return frameworkLocStrings().get(key);
    185185    }
     
    191191{
    192192    if (!stringsBundle) {
    193         MutexLocker lock(mainBundleLocStringsMutex());
     193        DeprecatedMutexLocker lock(mainBundleLocStringsMutex());
    194194        mainBundleLocStrings().set(key, value);
    195195        return;
    196196    }
    197197
    198     MutexLocker lock(frameworkLocStringsMutex());
     198    DeprecatedMutexLocker lock(frameworkLocStringsMutex());
    199199    frameworkLocStrings().set(key, value);
    200200}
  • trunk/Source/WebKit2/ChangeLog

    r187962 r187972  
     12015-08-04  Filip Pizlo  <[email protected]>
     2
     3        Rename Mutex to DeprecatedMutex
     4        https://bugs.webkit.org/show_bug.cgi?id=147675
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * DatabaseProcess/DatabaseProcess.cpp:
     9        (WebKit::DatabaseProcess::postDatabaseTask):
     10        (WebKit::DatabaseProcess::performNextDatabaseTask):
     11        * DatabaseProcess/DatabaseProcess.h:
     12        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
     13        (WebKit::UniqueIDBDatabase::shutdown):
     14        (WebKit::UniqueIDBDatabase::postMainThreadTask):
     15        (WebKit::UniqueIDBDatabase::performNextMainThreadTask):
     16        (WebKit::UniqueIDBDatabase::postDatabaseTask):
     17        (WebKit::UniqueIDBDatabase::performNextDatabaseTask):
     18        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
     19        * Platform/IPC/Connection.cpp:
     20        (IPC::Connection::sendSyncMessage):
     21        (IPC::Connection::sendSyncMessageFromSecondaryThread):
     22        (IPC::Connection::waitForSyncReply):
     23        (IPC::Connection::processIncomingSyncReply):
     24        (IPC::Connection::connectionDidClose):
     25        * Platform/IPC/Connection.h:
     26        * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
     27        (WebKit::CoordinatedGraphicsScene::appendUpdate):
     28        * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
     29        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
     30        (WebKit::ThreadedCompositor::createCompositingThread):
     31        (WebKit::ThreadedCompositor::runCompositingThread):
     32        (WebKit::ThreadedCompositor::terminateCompositingThread):
     33        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
     34        * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
     35        (WebKit::CustomProtocolManager::addCustomProtocol):
     36        (WebKit::CustomProtocolManager::removeCustomProtocol):
     37        (WebKit::CustomProtocolManager::registerScheme):
     38        (WebKit::CustomProtocolManager::unregisterScheme):
     39        (WebKit::CustomProtocolManager::supportsScheme):
     40        (WebKit::CustomProtocolManager::protocolForID):
     41        * Shared/Network/CustomProtocols/CustomProtocolManager.h:
     42        * Shared/linux/SeccompFilters/SeccompBroker.cpp:
     43        * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
     44        (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
     45        (WebKit::PluginProcessConnectionManager::removePluginProcessConnection):
     46        (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
     47        * WebProcess/Plugins/PluginProcessConnectionManager.h:
     48        * WebProcess/WebPage/EventDispatcher.cpp:
     49        (WebKit::EventDispatcher::addScrollingTreeForPage):
     50        (WebKit::EventDispatcher::removeScrollingTreeForPage):
     51        (WebKit::EventDispatcher::wheelEvent):
     52        * WebProcess/WebPage/EventDispatcher.h:
     53        * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
     54        (webkitSoupRequestInputStreamReadAsync):
     55        (webkitSoupRequestInputStreamAddData):
     56
    1572015-08-05  Daniel Bates  <[email protected]>
    258
  • trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp

    r187002 r187972  
    152152    ASSERT(RunLoop::isMain());
    153153
    154     MutexLocker locker(m_databaseTaskMutex);
     154    DeprecatedMutexLocker locker(m_databaseTaskMutex);
    155155
    156156    m_databaseTasks.append(WTF::move(task));
     
    167167    std::unique_ptr<AsyncTask> task;
    168168    {
    169         MutexLocker locker(m_databaseTaskMutex);
     169        DeprecatedMutexLocker locker(m_databaseTaskMutex);
    170170        ASSERT(!m_databaseTasks.isEmpty());
    171171        task = m_databaseTasks.takeFirst();
  • trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.h

    r187002 r187972  
    107107
    108108    Deque<std::unique_ptr<AsyncTask>> m_databaseTasks;
    109     Mutex m_databaseTaskMutex;
     109    DeprecatedMutex m_databaseTaskMutex;
    110110};
    111111
  • trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp

    r186279 r187972  
    137137
    138138    {
    139         MutexLocker locker(m_databaseTaskMutex);
     139        DeprecatedMutexLocker locker(m_databaseTaskMutex);
    140140        m_databaseTasks.clear();
    141141    }
     
    11261126        return;
    11271127
    1128     MutexLocker locker(m_mainThreadTaskMutex);
     1128    DeprecatedMutexLocker locker(m_mainThreadTaskMutex);
    11291129
    11301130    m_mainThreadTasks.append(WTF::move(task));
     
    11441144    std::unique_ptr<AsyncTask> task;
    11451145    {
    1146         MutexLocker locker(m_mainThreadTaskMutex);
     1146        DeprecatedMutexLocker locker(m_mainThreadTaskMutex);
    11471147
    11481148        // This database might be shutting down, in which case the task queue might be empty.
     
    11661166        return;
    11671167
    1168     MutexLocker locker(m_databaseTaskMutex);
     1168    DeprecatedMutexLocker locker(m_databaseTaskMutex);
    11691169
    11701170    m_databaseTasks.append(WTF::move(task));
     
    11871187    std::unique_ptr<AsyncTask> task;
    11881188    {
    1189         MutexLocker locker(m_databaseTaskMutex);
     1189        DeprecatedMutexLocker locker(m_databaseTaskMutex);
    11901190
    11911191        // This database might be shutting down on the main thread, in which case the task queue might be empty.
  • trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h

    r185637 r187972  
    211211
    212212    Deque<std::unique_ptr<AsyncTask>> m_databaseTasks;
    213     Mutex m_databaseTaskMutex;
     213    DeprecatedMutex m_databaseTaskMutex;
    214214
    215215    Deque<std::unique_ptr<AsyncTask>> m_mainThreadTasks;
    216     Mutex m_mainThreadTaskMutex;
     216    DeprecatedMutex m_mainThreadTaskMutex;
    217217};
    218218
  • trunk/Source/WebKit2/Platform/IPC/Connection.cpp

    r186714 r187972  
    460460    // Push the pending sync reply information on our stack.
    461461    {
    462         MutexLocker locker(m_syncReplyStateMutex);
     462        DeprecatedMutexLocker locker(m_syncReplyStateMutex);
    463463        if (!m_shouldWaitForSyncReplies) {
    464464            didFailToSendSyncMessage();
     
    487487    // Finally, pop the pending sync reply information.
    488488    {
    489         MutexLocker locker(m_syncReplyStateMutex);
     489        DeprecatedMutexLocker locker(m_syncReplyStateMutex);
    490490        ASSERT(m_pendingSyncReplies.last().syncRequestID == syncRequestID);
    491491        m_pendingSyncReplies.removeLast();
     
    509509    // Push the pending sync reply information on our stack.
    510510    {
    511         MutexLocker locker(m_syncReplyStateMutex);
     511        DeprecatedMutexLocker locker(m_syncReplyStateMutex);
    512512        if (!m_shouldWaitForSyncReplies)
    513513            return nullptr;
     
    527527    // Finally, pop the pending sync reply information.
    528528    {
    529         MutexLocker locker(m_syncReplyStateMutex);
     529        DeprecatedMutexLocker locker(m_syncReplyStateMutex);
    530530        ASSERT(m_secondaryThreadPendingSyncReplyMap.contains(syncRequestID));
    531531        m_secondaryThreadPendingSyncReplyMap.remove(syncRequestID);
     
    547547       
    548548        {
    549             MutexLocker locker(m_syncReplyStateMutex);
     549            DeprecatedMutexLocker locker(m_syncReplyStateMutex);
    550550
    551551            // Second, check if there is a sync reply at the top of the stack.
     
    593593void Connection::processIncomingSyncReply(std::unique_ptr<MessageDecoder> decoder)
    594594{
    595     MutexLocker locker(m_syncReplyStateMutex);
     595    DeprecatedMutexLocker locker(m_syncReplyStateMutex);
    596596
    597597    // Go through the stack of sync requests that have pending replies and see which one
     
    751751
    752752    {
    753         MutexLocker locker(m_syncReplyStateMutex);
     753        DeprecatedMutexLocker locker(m_syncReplyStateMutex);
    754754
    755755        ASSERT(m_shouldWaitForSyncReplies);
  • trunk/Source/WebKit2/Platform/IPC/Connection.h

    r186662 r187972  
    299299    friend class SyncMessageState;
    300300
    301     Mutex m_syncReplyStateMutex;
     301    DeprecatedMutex m_syncReplyStateMutex;
    302302    bool m_shouldWaitForSyncReplies;
    303303    Vector<PendingSyncReply> m_pendingSyncReplies;
  • trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp

    r183910 r187972  
    691691
    692692    ASSERT(isMainThread());
    693     MutexLocker locker(m_renderQueueMutex);
     693    DeprecatedMutexLocker locker(m_renderQueueMutex);
    694694    m_renderQueue.append(WTF::move(function));
    695695}
  • trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h

    r178182 r187972  
    146146    // Render queue can be accessed ony from main thread or updatePaintNode call stack!
    147147    Vector<std::function<void()>> m_renderQueue;
    148     Mutex m_renderQueueMutex;
     148    DeprecatedMutex m_renderQueueMutex;
    149149
    150150    std::unique_ptr<WebCore::TextureMapper> m_textureMapper;
  • trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp

    r187416 r187972  
    296296        return;
    297297
    298     MutexLocker locker(m_initializeRunLoopConditionMutex);
     298    DeprecatedMutexLocker locker(m_initializeRunLoopConditionMutex);
    299299    m_threadIdentifier = createThread(compositingThreadEntry, this, "WebCore: ThreadedCompositor");
    300300
     
    305305{
    306306    {
    307         MutexLocker locker(m_initializeRunLoopConditionMutex);
     307        DeprecatedMutexLocker locker(m_initializeRunLoopConditionMutex);
    308308
    309309        m_compositingRunLoop = std::make_unique<CompositingRunLoop>([&] {
     
    322322
    323323    {
    324         MutexLocker locker(m_terminateRunLoopConditionMutex);
     324        DeprecatedMutexLocker locker(m_terminateRunLoopConditionMutex);
    325325        m_compositingRunLoop = nullptr;
    326326        m_context = nullptr;
     
    333333void ThreadedCompositor::terminateCompositingThread()
    334334{
    335     MutexLocker locker(m_terminateRunLoopConditionMutex);
     335    DeprecatedMutexLocker locker(m_terminateRunLoopConditionMutex);
    336336
    337337    m_scene->detach();
  • trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h

    r186059 r187972  
    112112    ThreadIdentifier m_threadIdentifier;
    113113    ThreadCondition m_initializeRunLoopCondition;
    114     Mutex m_initializeRunLoopConditionMutex;
     114    DeprecatedMutex m_initializeRunLoopConditionMutex;
    115115    ThreadCondition m_terminateRunLoopCondition;
    116     Mutex m_terminateRunLoopConditionMutex;
     116    DeprecatedMutex m_terminateRunLoopConditionMutex;
    117117};
    118118
  • trunk/Source/WebKit2/Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm

    r187609 r187972  
    166166{
    167167    ASSERT(customProtocol);
    168     MutexLocker locker(m_customProtocolMapMutex);
     168    DeprecatedMutexLocker locker(m_customProtocolMapMutex);
    169169    m_customProtocolMap.add(customProtocol.customProtocolID, customProtocol);
    170170}
     
    173173{
    174174    ASSERT(customProtocol);
    175     MutexLocker locker(m_customProtocolMapMutex);
     175    DeprecatedMutexLocker locker(m_customProtocolMapMutex);
    176176    m_customProtocolMap.remove(customProtocol.customProtocolID);
    177177}
     
    180180{
    181181    ASSERT(!scheme.isNull());
    182     MutexLocker locker(m_registeredSchemesMutex);
     182    DeprecatedMutexLocker locker(m_registeredSchemesMutex);
    183183    m_registeredSchemes.add(scheme);
    184184}
     
    187187{
    188188    ASSERT(!scheme.isNull());
    189     MutexLocker locker(m_registeredSchemesMutex);
     189    DeprecatedMutexLocker locker(m_registeredSchemesMutex);
    190190    m_registeredSchemes.remove(scheme);
    191191}
     
    196196        return false;
    197197
    198     MutexLocker locker(m_registeredSchemesMutex);
     198    DeprecatedMutexLocker locker(m_registeredSchemesMutex);
    199199    return m_registeredSchemes.contains(scheme);
    200200}
     
    262262RetainPtr<WKCustomProtocol> CustomProtocolManager::protocolForID(uint64_t customProtocolID)
    263263{
    264     MutexLocker locker(m_customProtocolMapMutex);
     264    DeprecatedMutexLocker locker(m_customProtocolMapMutex);
    265265
    266266    CustomProtocolMap::const_iterator it = m_customProtocolMap.find(customProtocolID);
  • trunk/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h

    r180410 r187972  
    101101#if PLATFORM(COCOA)
    102102    HashSet<String> m_registeredSchemes;
    103     Mutex m_registeredSchemesMutex;
     103    DeprecatedMutex m_registeredSchemesMutex;
    104104
    105105    typedef HashMap<uint64_t, RetainPtr<WKCustomProtocol>> CustomProtocolMap;
    106106    CustomProtocolMap m_customProtocolMap;
    107     Mutex m_customProtocolMapMutex;
     107    DeprecatedMutex m_customProtocolMapMutex;
    108108   
    109109    // WKCustomProtocol objects can be removed from the m_customProtocolMap from multiple threads.
  • trunk/Source/WebKit2/Shared/linux/SeccompFilters/SeccompBroker.cpp

    r187455 r187972  
    6666    int m_socket;
    6767
    68     mutable Mutex m_socketLock;
     68    mutable DeprecatedMutex m_socketLock;
    6969
    7070    // Maps files that may be read by malloc() to open file descriptors.
  • trunk/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp

    r186566 r187972  
    8787
    8888    {
    89         MutexLocker locker(m_tokensAndConnectionsMutex);
     89        DeprecatedMutexLocker locker(m_tokensAndConnectionsMutex);
    9090        ASSERT(!m_tokensAndConnections.contains(pluginProcessToken));
    9191
     
    102102
    103103    {
    104         MutexLocker locker(m_tokensAndConnectionsMutex);
     104        DeprecatedMutexLocker locker(m_tokensAndConnectionsMutex);
    105105        ASSERT(m_tokensAndConnections.contains(pluginProcessConnection->pluginProcessToken()));
    106106       
     
    113113void PluginProcessConnectionManager::pluginProcessCrashed(uint64_t pluginProcessToken)
    114114{
    115     MutexLocker locker(m_tokensAndConnectionsMutex);
     115    DeprecatedMutexLocker locker(m_tokensAndConnectionsMutex);
    116116    IPC::Connection* connection = m_tokensAndConnections.get(pluginProcessToken);
    117117
  • trunk/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.h

    r186566 r187972  
    6565    Vector<RefPtr<PluginProcessConnection>> m_pluginProcessConnections;
    6666
    67     Mutex m_tokensAndConnectionsMutex;
     67    DeprecatedMutex m_tokensAndConnectionsMutex;
    6868    HashMap<uint64_t, RefPtr<IPC::Connection>> m_tokensAndConnections;
    6969};
  • trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp

    r186566 r187972  
    6666void EventDispatcher::addScrollingTreeForPage(WebPage* webPage)
    6767{
    68     MutexLocker locker(m_scrollingTreesMutex);
     68    DeprecatedMutexLocker locker(m_scrollingTreesMutex);
    6969
    7070    ASSERT(webPage->corePage()->scrollingCoordinator());
     
    7777void EventDispatcher::removeScrollingTreeForPage(WebPage* webPage)
    7878{
    79     MutexLocker locker(m_scrollingTreesMutex);
     79    DeprecatedMutexLocker locker(m_scrollingTreesMutex);
    8080    ASSERT(m_scrollingTrees.contains(webPage->pageID()));
    8181
     
    133133
    134134#if ENABLE(ASYNC_SCROLLING)
    135     MutexLocker locker(m_scrollingTreesMutex);
     135    DeprecatedMutexLocker locker(m_scrollingTreesMutex);
    136136    if (RefPtr<ThreadedScrollingTree> scrollingTree = m_scrollingTrees.get(pageID)) {
    137137        // FIXME: It's pretty horrible that we're updating the back/forward state here.
  • trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.h

    r186566 r187972  
    9393
    9494#if ENABLE(ASYNC_SCROLLING)
    95     Mutex m_scrollingTreesMutex;
     95    DeprecatedMutex m_scrollingTreesMutex;
    9696    HashMap<uint64_t, RefPtr<WebCore::ThreadedScrollingTree>> m_scrollingTrees;
    9797#endif
  • trunk/Source/WebKit2/WebProcess/soup/WebKitSoupRequestInputStream.cpp

    r185808 r187972  
    4242    uint64_t bytesRead;
    4343
    44     Mutex readLock;
     44    DeprecatedMutex readLock;
    4545    std::unique_ptr<AsyncReadData> pendingAsyncRead;
    4646};
     
    8585    GRefPtr<GTask> task = adoptGRef(g_task_new(stream, cancellable, callback, userData));
    8686
    87     MutexLocker locker(stream->priv->readLock);
     87    DeprecatedMutexLocker locker(stream->priv->readLock);
    8888
    8989    if (!webkitSoupRequestInputStreamHasDataToRead(stream) && !webkitSoupRequestInputStreamIsWaitingForData(stream)) {
     
    144144        return;
    145145
    146     MutexLocker locker(stream->priv->readLock);
     146    DeprecatedMutexLocker locker(stream->priv->readLock);
    147147
    148148    if (dataLength) {
  • trunk/Tools/ChangeLog

    r187965 r187972  
     12015-08-04  Filip Pizlo  <[email protected]>
     2
     3        Rename Mutex to DeprecatedMutex
     4        https://bugs.webkit.org/show_bug.cgi?id=147675
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * DumpRenderTree/JavaScriptThreading.cpp:
     9        (javaScriptThreadsMutex):
     10        (runJavaScriptThread):
     11        (startJavaScriptThreads):
     12        (stopJavaScriptThreads):
     13        * TestWebKitAPI/Tests/WTF/WorkQueue.cpp:
     14        (TestWebKitAPI::TEST):
     15        * TestWebKitAPI/Tests/WTF/glib/WorkQueueGLib.cpp:
     16        (TestWebKitAPI::TEST):
     17
    1182015-08-05  Timothy Hatcher  <[email protected]>
    219
  • trunk/Tools/DumpRenderTree/JavaScriptThreading.cpp

    r179319 r187972  
    4545static JSContextGroupRef javaScriptThreadsGroup;
    4646
    47 static Mutex& javaScriptThreadsMutex()
     47static DeprecatedMutex& javaScriptThreadsMutex()
    4848{
    49     DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, staticMutex, ());
     49    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, staticMutex, ());
    5050    return staticMutex;
    5151}
     
    7171    JSGlobalContextRef ctx;
    7272    {
    73         MutexLocker locker(javaScriptThreadsMutex());
     73        DeprecatedMutexLocker locker(javaScriptThreadsMutex());
    7474        ctx = JSGlobalContextCreateInGroup(javaScriptThreadsGroup, 0);
    7575    }
     
    7777    JSStringRef scriptRef;
    7878    {
    79         MutexLocker locker(javaScriptThreadsMutex());
     79        DeprecatedMutexLocker locker(javaScriptThreadsMutex());
    8080        scriptRef = JSStringCreateWithUTF8CString(script);
    8181    }
     
    8383    while (true) {
    8484        {
    85             MutexLocker locker(javaScriptThreadsMutex());
     85            DeprecatedMutexLocker locker(javaScriptThreadsMutex());
    8686            JSValueRef exception = 0;
    8787            JSEvaluateScript(ctx, scriptRef, 0, 0, 1, &exception);
     
    9090
    9191        {
    92             MutexLocker locker(javaScriptThreadsMutex());
     92            DeprecatedMutexLocker locker(javaScriptThreadsMutex());
    9393            const size_t valuesCount = 1024;
    9494            JSValueRef values[valuesCount];
     
    9898
    9999        {
    100             MutexLocker locker(javaScriptThreadsMutex());
     100            DeprecatedMutexLocker locker(javaScriptThreadsMutex());
    101101            if (javaScriptThreadsShouldTerminate)
    102102                break;
     
    107107            continue;
    108108
    109         MutexLocker locker(javaScriptThreadsMutex());
     109        DeprecatedMutexLocker locker(javaScriptThreadsMutex());
    110110        ThreadIdentifier thread = currentThread();
    111111        detachThread(thread);
     
    115115    }
    116116
    117     MutexLocker locker(javaScriptThreadsMutex());
     117    DeprecatedMutexLocker locker(javaScriptThreadsMutex());
    118118    JSStringRelease(scriptRef);
    119119    JSGarbageCollect(ctx);
     
    125125    javaScriptThreadsGroup = JSContextGroupCreate();
    126126
    127     MutexLocker locker(javaScriptThreadsMutex());
     127    DeprecatedMutexLocker locker(javaScriptThreadsMutex());
    128128
    129129    for (size_t i = 0; i < javaScriptThreadsCount; ++i)
     
    134134{
    135135    {
    136         MutexLocker locker(javaScriptThreadsMutex());
     136        DeprecatedMutexLocker locker(javaScriptThreadsMutex());
    137137        javaScriptThreadsShouldTerminate = true;
    138138    }
     
    140140    Vector<ThreadIdentifier, javaScriptThreadsCount> threads;
    141141    {
    142         MutexLocker locker(javaScriptThreadsMutex());
     142        DeprecatedMutexLocker locker(javaScriptThreadsMutex());
    143143        copyToVector(javaScriptThreads(), threads);
    144144        ASSERT(threads.size() == javaScriptThreadsCount);
     
    149149
    150150    {
    151         MutexLocker locker(javaScriptThreadsMutex());
     151        DeprecatedMutexLocker locker(javaScriptThreadsMutex());
    152152        javaScriptThreads().clear();
    153153    }
  • trunk/Tools/TestWebKitAPI/Tests/WTF/WorkQueue.cpp

    r181880 r187972  
    4141TEST(WTF_WorkQueue, Simple)
    4242{
    43     Mutex m_lock;
     43    DeprecatedMutex m_lock;
    4444    ThreadCondition m_testCompleted;
    4545    Vector<std::string> m_functionCallOrder;
     
    5757    EXPECT_EQ(1, initialRefCount);
    5858
    59     MutexLocker locker(m_lock);
     59    DeprecatedMutexLocker locker(m_lock);
    6060    queue->dispatch([&](void) {
    6161        m_functionCallOrder.append(simpleTestLabel);
     
    7070
    7171    queue->dispatch([&](void) {
    72         MutexLocker locker(m_lock);
     72        DeprecatedMutexLocker locker(m_lock);
    7373        m_functionCallOrder.append(thirdTestLabel);
    7474        calledThirdTest = true;
     
    9797TEST(WTF_WorkQueue, TwoQueues)
    9898{
    99     Mutex m_lock;
     99    DeprecatedMutex m_lock;
    100100    ThreadCondition m_testQueue1Completed, m_testQueue2Completed;
    101101    Vector<std::string> m_functionCallOrder;
     
    111111    EXPECT_EQ(1, queue2->refCount());
    112112
    113     MutexLocker locker(m_lock);
     113    DeprecatedMutexLocker locker(m_lock);
    114114   
    115115    queue1->dispatch([&](void) {
     
    121121        std::this_thread::sleep_for(std::chrono::milliseconds(50));
    122122
    123         MutexLocker locker(m_lock);
     123        DeprecatedMutexLocker locker(m_lock);
    124124
    125125        // Will fail if queue2 took the mutex before queue1.
     
    132132
    133133    queue1->dispatch([&](void) {
    134         MutexLocker locker(m_lock);
     134        DeprecatedMutexLocker locker(m_lock);
    135135        m_functionCallOrder.append(thirdTestLabel);
    136136        calledThirdTest = true;
     
    159159TEST(WTF_WorkQueue, DispatchAfter)
    160160{
    161     Mutex m_lock;
     161    DeprecatedMutex m_lock;
    162162    ThreadCondition m_testCompleted, m_dispatchAfterTestCompleted;
    163163    Vector<std::string> m_functionCallOrder;
     
    168168    auto queue = WorkQueue::create("com.apple.WebKit.Test.dispatchAfter");
    169169
    170     MutexLocker locker(m_lock);
    171 
    172     queue->dispatch([&](void) {
    173         MutexLocker locker(m_lock);
     170    DeprecatedMutexLocker locker(m_lock);
     171
     172    queue->dispatch([&](void) {
     173        DeprecatedMutexLocker locker(m_lock);
    174174        m_functionCallOrder.append(simpleTestLabel);
    175175        calledSimpleTest = true;
     
    178178
    179179    queue->dispatchAfter(std::chrono::milliseconds(500), [&](void) {
    180         MutexLocker locker(m_lock);
     180        DeprecatedMutexLocker locker(m_lock);
    181181        m_functionCallOrder.append(dispatchAfterLabel);
    182182        calledDispatchAfterTest = true;
  • trunk/Tools/TestWebKitAPI/Tests/WTF/glib/WorkQueueGLib.cpp

    r185502 r187972  
    3838{
    3939    struct TestingContext {
    40         Mutex m_lock;
     40        DeprecatedMutex m_lock;
    4141        ThreadCondition m_testCompleted;
    4242        GMainContext* m_mainContext;
     
    5050    GRefPtr<GFile> file = adoptGRef(g_file_new_for_path(currentDirectory.get()));
    5151
    52     MutexLocker locker(context.m_lock);
     52    DeprecatedMutexLocker locker(context.m_lock);
    5353    queue->dispatch([&](void) {
    5454        EXPECT_TRUE(g_main_context_get_thread_default());
     
    5858            [](GObject*, GAsyncResult*, gpointer userData) {
    5959                TestingContext* context = static_cast<TestingContext*>(userData);
    60                 MutexLocker locker(context->m_lock);
     60                DeprecatedMutexLocker locker(context->m_lock);
    6161                EXPECT_EQ(g_main_context_get_thread_default(), context->m_mainContext);
    6262                context->m_testCompleted.signal();
Note: See TracChangeset for help on using the changeset viewer.