Unreviewed, roll out http://trac.webkit.org/changeset/187972.
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Aug 2015 23:42:57 +0000 (23:42 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Aug 2015 23:42:57 +0000 (23:42 +0000)
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:

* 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/DatabaseTask.h:
* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseThread::start):
(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::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::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::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/ThreadSpecificWin.cpp:
(WTF::destructorsList):
(WTF::destructorsMutex):
(WTF::threadSpecificKeyCreate):
(WTF::threadSpecificKeyDelete):
(WTF::ThreadSpecificThreadExit):
* 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::Mutex::Mutex):
(WTF::Mutex::~Mutex):
(WTF::Mutex::lock):
(WTF::Mutex::tryLock):
(WTF::Mutex::unlock):
(WTF::ThreadCondition::~ThreadCondition):
(WTF::ThreadCondition::wait):
(WTF::ThreadCondition::timedWait):
(WTF::DeprecatedMutex::DeprecatedMutex): Deleted.
(WTF::DeprecatedMutex::~DeprecatedMutex): Deleted.
(WTF::DeprecatedMutex::lock): Deleted.
(WTF::DeprecatedMutex::tryLock): Deleted.
(WTF::DeprecatedMutex::unlock): Deleted.
* wtf/ThreadingWin.cpp:
(WTF::initializeCurrentThreadInternal):
(WTF::threadMapMutex):
(WTF::initializeThreading):
(WTF::storeThreadHandleByIdentifier):
(WTF::threadHandleForIdentifier):
(WTF::clearThreadHandleForIdentifier):
(WTF::currentThread):
(WTF::Mutex::Mutex):
(WTF::Mutex::~Mutex):
(WTF::Mutex::lock):
(WTF::Mutex::tryLock):
(WTF::Mutex::unlock):
(WTF::ThreadCondition::~ThreadCondition):
(WTF::ThreadCondition::wait):
(WTF::ThreadCondition::timedWait):
(WTF::DeprecatedMutex::DeprecatedMutex): Deleted.
(WTF::DeprecatedMutex::~DeprecatedMutex): Deleted.
(WTF::DeprecatedMutex::lock): Deleted.
(WTF::DeprecatedMutex::tryLock): Deleted.
(WTF::DeprecatedMutex::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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188002 268f45cc-cd09-0410-ab3c-d52691b4dbfc

129 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecode/SamplingTool.cpp
Source/JavaScriptCore/bytecode/SamplingTool.h
Source/JavaScriptCore/dfg/DFGThreadData.h
Source/JavaScriptCore/dfg/DFGWorklist.cpp
Source/JavaScriptCore/dfg/DFGWorklist.h
Source/JavaScriptCore/disassembler/Disassembler.cpp
Source/JavaScriptCore/heap/CopiedSpace.cpp
Source/JavaScriptCore/heap/CopiedSpace.h
Source/JavaScriptCore/heap/CopiedSpaceInlines.h
Source/JavaScriptCore/heap/HeapTimer.h
Source/JavaScriptCore/heap/MachineStackMarker.cpp
Source/JavaScriptCore/heap/MachineStackMarker.h
Source/JavaScriptCore/interpreter/JSStack.cpp
Source/JavaScriptCore/jit/JITThunks.h
Source/JavaScriptCore/profiler/ProfilerDatabase.h
Source/WTF/ChangeLog
Source/WTF/wtf/Atomics.cpp
Source/WTF/wtf/MessageQueue.h
Source/WTF/wtf/ParallelJobsGeneric.cpp
Source/WTF/wtf/ParallelJobsGeneric.h
Source/WTF/wtf/RunLoop.cpp
Source/WTF/wtf/RunLoop.h
Source/WTF/wtf/ThreadSpecificWin.cpp
Source/WTF/wtf/Threading.cpp
Source/WTF/wtf/ThreadingPrimitives.h
Source/WTF/wtf/ThreadingPthreads.cpp
Source/WTF/wtf/ThreadingWin.cpp
Source/WTF/wtf/WorkQueue.h
Source/WTF/wtf/dtoa.cpp
Source/WTF/wtf/dtoa.h
Source/WTF/wtf/efl/DispatchQueueEfl.cpp
Source/WTF/wtf/efl/DispatchQueueEfl.h
Source/WTF/wtf/efl/RunLoopEfl.cpp
Source/WTF/wtf/threads/BinarySemaphore.cpp
Source/WTF/wtf/threads/BinarySemaphore.h
Source/WTF/wtf/win/WorkQueueWin.cpp
Source/WebCore/ChangeLog
Source/WebCore/Modules/webaudio/AsyncAudioDecoder.cpp
Source/WebCore/Modules/webaudio/AsyncAudioDecoder.h
Source/WebCore/Modules/webaudio/AudioContext.h
Source/WebCore/Modules/webaudio/MediaStreamAudioSource.cpp
Source/WebCore/Modules/webaudio/MediaStreamAudioSource.h
Source/WebCore/Modules/webdatabase/Database.cpp
Source/WebCore/Modules/webdatabase/DatabaseTask.h
Source/WebCore/Modules/webdatabase/DatabaseThread.cpp
Source/WebCore/Modules/webdatabase/DatabaseThread.h
Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp
Source/WebCore/Modules/webdatabase/DatabaseTracker.h
Source/WebCore/Modules/webdatabase/OriginLock.h
Source/WebCore/Modules/webdatabase/SQLCallbackWrapper.h
Source/WebCore/Modules/webdatabase/SQLTransactionBackend.cpp
Source/WebCore/Modules/webdatabase/SQLTransactionBackend.h
Source/WebCore/bindings/js/WorkerScriptController.cpp
Source/WebCore/bindings/js/WorkerScriptController.h
Source/WebCore/dom/default/PlatformMessagePortChannel.cpp
Source/WebCore/dom/default/PlatformMessagePortChannel.h
Source/WebCore/loader/icon/IconDatabase.cpp
Source/WebCore/loader/icon/IconDatabase.h
Source/WebCore/page/scrolling/ScrollingTree.cpp
Source/WebCore/page/scrolling/ScrollingTree.h
Source/WebCore/platform/MemoryPressureHandler.h
Source/WebCore/platform/audio/HRTFDatabaseLoader.cpp
Source/WebCore/platform/audio/HRTFDatabaseLoader.h
Source/WebCore/platform/cocoa/MemoryPressureHandlerCocoa.mm
Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp
Source/WebCore/platform/graphics/DisplayRefreshMonitor.h
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h
Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp
Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h
Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h
Source/WebCore/platform/graphics/mac/DisplayRefreshMonitorMac.cpp
Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp
Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h
Source/WebCore/platform/ios/LegacyTileCache.h
Source/WebCore/platform/ios/LegacyTileCache.mm
Source/WebCore/platform/ios/LegacyTileLayerPool.h
Source/WebCore/platform/ios/LegacyTileLayerPool.mm
Source/WebCore/platform/network/curl/CurlDownload.cpp
Source/WebCore/platform/network/curl/CurlDownload.h
Source/WebCore/platform/network/curl/ResourceHandleManager.cpp
Source/WebCore/platform/network/ios/QuickLook.mm
Source/WebCore/platform/sql/SQLiteDatabase.cpp
Source/WebCore/platform/sql/SQLiteDatabase.h
Source/WebCore/platform/sql/SQLiteStatement.cpp
Source/WebCore/workers/WorkerThread.cpp
Source/WebCore/workers/WorkerThread.h
Source/WebKit/ChangeLog
Source/WebKit/Storage/StorageAreaSync.cpp
Source/WebKit/Storage/StorageAreaSync.h
Source/WebKit/Storage/StorageTracker.cpp
Source/WebKit/Storage/StorageTracker.h
Source/WebKit/ios/ChangeLog
Source/WebKit/ios/WebCoreSupport/WebFixedPositionContent.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Storage/WebDatabaseManager.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/mac/WebView/WebViewData.h
Source/WebKit/win/ChangeLog
Source/WebKit/win/Plugins/PluginMainThreadScheduler.cpp
Source/WebKit/win/Plugins/PluginMainThreadScheduler.h
Source/WebKit/win/WebIconDatabase.cpp
Source/WebKit/win/WebLocalizableStrings.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp
Source/WebKit2/DatabaseProcess/DatabaseProcess.h
Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp
Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h
Source/WebKit2/Platform/IPC/Connection.cpp
Source/WebKit2/Platform/IPC/Connection.h
Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp
Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h
Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp
Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h
Source/WebKit2/Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm
Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h
Source/WebKit2/Shared/linux/SeccompFilters/SeccompBroker.cpp
Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp
Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.h
Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp
Source/WebKit2/WebProcess/WebPage/EventDispatcher.h
Source/WebKit2/WebProcess/soup/WebKitSoupRequestInputStream.cpp
Tools/ChangeLog
Tools/DumpRenderTree/JavaScriptThreading.cpp
Tools/TestWebKitAPI/Tests/WTF/WorkQueue.cpp
Tools/TestWebKitAPI/Tests/WTF/glib/WorkQueueGLib.cpp

index e265d68..236fad7 100644 (file)
@@ -1,3 +1,54 @@
+2015-08-05  Filip Pizlo  <fpizlo@apple.com>
+
+        Unreviewed, roll out http://trac.webkit.org/changeset/187972.
+
+        * 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:
+
 2015-08-05  Saam barati  <saambarati1@gmail.com>
 
         Bytecodegenerator emits crappy code for returns in a lexical scope.
 2015-08-05  Saam barati  <saambarati1@gmail.com>
 
         Bytecodegenerator emits crappy code for returns in a lexical scope.
index dc2317e..12dbf24 100644 (file)
@@ -285,7 +285,7 @@ void SamplingTool::doRun()
 
 #if ENABLE(CODEBLOCK_SAMPLING)
     if (CodeBlock* codeBlock = sample.codeBlock()) {
 
 #if ENABLE(CODEBLOCK_SAMPLING)
     if (CodeBlock* codeBlock = sample.codeBlock()) {
-        DeprecatedMutexLocker locker(m_scriptSampleMapMutex);
+        MutexLocker locker(m_scriptSampleMapMutex);
         ScriptSampleRecord* record = m_scopeSampleMap->get(codeBlock->ownerExecutable());
         ASSERT(record);
         record->sample(codeBlock, sample.vPC());
         ScriptSampleRecord* record = m_scopeSampleMap->get(codeBlock->ownerExecutable());
         ASSERT(record);
         record->sample(codeBlock, sample.vPC());
@@ -301,7 +301,7 @@ void SamplingTool::sample()
 void SamplingTool::notifyOfScope(VM& vm, ScriptExecutable* script)
 {
 #if ENABLE(CODEBLOCK_SAMPLING)
 void SamplingTool::notifyOfScope(VM& vm, ScriptExecutable* script)
 {
 #if ENABLE(CODEBLOCK_SAMPLING)
-    DeprecatedMutexLocker locker(m_scriptSampleMapMutex);
+    MutexLocker locker(m_scriptSampleMapMutex);
     m_scopeSampleMap->set(script, adoptPtr(new ScriptSampleRecord(vm, script)));
 #else
     UNUSED_PARAM(vm);
     m_scopeSampleMap->set(script, adoptPtr(new ScriptSampleRecord(vm, script)));
 #else
     UNUSED_PARAM(vm);
index 6a47ba8..44714c6 100644 (file)
@@ -338,7 +338,7 @@ namespace JSC {
         unsigned m_opcodeSamplesInCTIFunctions[numOpcodeIDs];
         
 #if ENABLE(CODEBLOCK_SAMPLING)
         unsigned m_opcodeSamplesInCTIFunctions[numOpcodeIDs];
         
 #if ENABLE(CODEBLOCK_SAMPLING)
-        DeprecatedMutex m_scriptSampleMapMutex;
+        Mutex m_scriptSampleMapMutex;
         std::unique_ptr<ScriptSampleRecordMap> m_scopeSampleMap;
 #endif
     };
         std::unique_ptr<ScriptSampleRecordMap> m_scopeSampleMap;
 #endif
     };
index 36385e2..e9fc565 100644 (file)
@@ -48,7 +48,7 @@ private:
     
     Worklist* m_worklist;
     ThreadIdentifier m_identifier;
     
     Worklist* m_worklist;
     ThreadIdentifier m_identifier;
-    DeprecatedMutex m_rightToRun;
+    Mutex m_rightToRun;
     Safepoint* m_safepoint;
 };
 
     Safepoint* m_safepoint;
 };
 
index 32265e7..4a8f572 100644 (file)
@@ -46,7 +46,7 @@ Worklist::Worklist(CString worklistName)
 Worklist::~Worklist()
 {
     {
 Worklist::~Worklist()
 {
     {
-        DeprecatedMutexLocker locker(m_lock);
+        MutexLocker locker(m_lock);
         for (unsigned i = m_threads.size(); i--;)
             m_queue.append(nullptr); // Use null plan to indicate that we want the thread to terminate.
         m_planEnqueued.broadcast();
         for (unsigned i = m_threads.size(); i--;)
             m_queue.append(nullptr); // Use null plan to indicate that we want the thread to terminate.
         m_planEnqueued.broadcast();
@@ -77,7 +77,7 @@ Ref<Worklist> Worklist::create(CString worklistName, unsigned numberOfThreads, i
 
 bool Worklist::isActiveForVM(VM& vm) const
 {
 
 bool Worklist::isActiveForVM(VM& vm) const
 {
-    DeprecatedMutexLocker locker(m_lock);
+    MutexLocker locker(m_lock);
     PlanMap::const_iterator end = m_plans.end();
     for (PlanMap::const_iterator iter = m_plans.begin(); iter != end; ++iter) {
         if (&iter->value->vm == &vm)
     PlanMap::const_iterator end = m_plans.end();
     for (PlanMap::const_iterator iter = m_plans.begin(); iter != end; ++iter) {
         if (&iter->value->vm == &vm)
@@ -89,7 +89,7 @@ bool Worklist::isActiveForVM(VM& vm) const
 void Worklist::enqueue(PassRefPtr<Plan> passedPlan)
 {
     RefPtr<Plan> plan = passedPlan;
 void Worklist::enqueue(PassRefPtr<Plan> passedPlan)
 {
     RefPtr<Plan> plan = passedPlan;
-    DeprecatedMutexLocker locker(m_lock);
+    MutexLocker locker(m_lock);
     if (Options::verboseCompilationQueue()) {
         dump(locker, WTF::dataFile());
         dataLog(": Enqueueing plan to optimize ", plan->key(), "\n");
     if (Options::verboseCompilationQueue()) {
         dump(locker, WTF::dataFile());
         dataLog(": Enqueueing plan to optimize ", plan->key(), "\n");
@@ -102,7 +102,7 @@ void Worklist::enqueue(PassRefPtr<Plan> passedPlan)
 
 Worklist::State Worklist::compilationState(CompilationKey key)
 {
 
 Worklist::State Worklist::compilationState(CompilationKey key)
 {
-    DeprecatedMutexLocker locker(m_lock);
+    MutexLocker locker(m_lock);
     PlanMap::iterator iter = m_plans.find(key);
     if (iter == m_plans.end())
         return NotKnown;
     PlanMap::iterator iter = m_plans.find(key);
     if (iter == m_plans.end())
         return NotKnown;
@@ -118,7 +118,7 @@ void Worklist::waitUntilAllPlansForVMAreReady(VM& vm)
     // After we release this lock, we know that although other VMs may still
     // be adding plans, our VM will not be.
     
     // After we release this lock, we know that although other VMs may still
     // be adding plans, our VM will not be.
     
-    DeprecatedMutexLocker locker(m_lock);
+    MutexLocker locker(m_lock);
     
     if (Options::verboseCompilationQueue()) {
         dump(locker, WTF::dataFile());
     
     if (Options::verboseCompilationQueue()) {
         dump(locker, WTF::dataFile());
@@ -147,7 +147,7 @@ void Worklist::waitUntilAllPlansForVMAreReady(VM& vm)
 void Worklist::removeAllReadyPlansForVM(VM& vm, Vector<RefPtr<Plan>, 8>& myReadyPlans)
 {
     DeferGC deferGC(vm.heap);
 void Worklist::removeAllReadyPlansForVM(VM& vm, Vector<RefPtr<Plan>, 8>& myReadyPlans)
 {
     DeferGC deferGC(vm.heap);
-    DeprecatedMutexLocker locker(m_lock);
+    MutexLocker locker(m_lock);
     for (size_t i = 0; i < m_readyPlans.size(); ++i) {
         RefPtr<Plan> plan = m_readyPlans[i];
         if (&plan->vm != &vm)
     for (size_t i = 0; i < m_readyPlans.size(); ++i) {
         RefPtr<Plan> plan = m_readyPlans[i];
         if (&plan->vm != &vm)
@@ -192,7 +192,7 @@ Worklist::State Worklist::completeAllReadyPlansForVM(VM& vm, CompilationKey requ
     }
     
     if (!!requestedKey && resultingState == NotKnown) {
     }
     
     if (!!requestedKey && resultingState == NotKnown) {
-        DeprecatedMutexLocker locker(m_lock);
+        MutexLocker locker(m_lock);
         if (m_plans.contains(requestedKey))
             resultingState = Compiling;
     }
         if (m_plans.contains(requestedKey))
             resultingState = Compiling;
     }
@@ -225,7 +225,7 @@ void Worklist::visitWeakReferences(SlotVisitor& visitor, CodeBlockSet& codeBlock
 {
     VM* vm = visitor.heap()->vm();
     {
 {
     VM* vm = visitor.heap()->vm();
     {
-        DeprecatedMutexLocker locker(m_lock);
+        MutexLocker locker(m_lock);
         for (PlanMap::iterator iter = m_plans.begin(); iter != m_plans.end(); ++iter) {
             Plan* plan = iter->value.get();
             if (&plan->vm != vm)
         for (PlanMap::iterator iter = m_plans.begin(); iter != m_plans.end(); ++iter) {
             Plan* plan = iter->value.get();
             if (&plan->vm != vm)
@@ -248,7 +248,7 @@ void Worklist::visitWeakReferences(SlotVisitor& visitor, CodeBlockSet& codeBlock
 void Worklist::removeDeadPlans(VM& vm)
 {
     {
 void Worklist::removeDeadPlans(VM& vm)
 {
     {
-        DeprecatedMutexLocker locker(m_lock);
+        MutexLocker locker(m_lock);
         HashSet<CompilationKey> deadPlanKeys;
         for (PlanMap::iterator iter = m_plans.begin(); iter != m_plans.end(); ++iter) {
             Plan* plan = iter->value.get();
         HashSet<CompilationKey> deadPlanKeys;
         for (PlanMap::iterator iter = m_plans.begin(); iter != m_plans.end(); ++iter) {
             Plan* plan = iter->value.get();
@@ -295,17 +295,17 @@ void Worklist::removeDeadPlans(VM& vm)
 
 size_t Worklist::queueLength()
 {
 
 size_t Worklist::queueLength()
 {
-    DeprecatedMutexLocker locker(m_lock);
+    MutexLocker locker(m_lock);
     return m_queue.size();
 }
 
 void Worklist::dump(PrintStream& out) const
 {
     return m_queue.size();
 }
 
 void Worklist::dump(PrintStream& out) const
 {
-    DeprecatedMutexLocker locker(m_lock);
+    MutexLocker locker(m_lock);
     dump(locker, out);
 }
 
     dump(locker, out);
 }
 
-void Worklist::dump(const DeprecatedMutexLocker&, PrintStream& out) const
+void Worklist::dump(const MutexLocker&, PrintStream& out) const
 {
     out.print(
         "Worklist(", RawPointer(this), ")[Queue Length = ", m_queue.size(),
 {
     out.print(
         "Worklist(", RawPointer(this), ")[Queue Length = ", m_queue.size(),
@@ -325,7 +325,7 @@ void Worklist::runThread(ThreadData* data)
     for (;;) {
         RefPtr<Plan> plan;
         {
     for (;;) {
         RefPtr<Plan> plan;
         {
-            DeprecatedMutexLocker locker(m_lock);
+            MutexLocker locker(m_lock);
             while (m_queue.isEmpty())
                 m_planEnqueued.wait(m_lock);
             
             while (m_queue.isEmpty())
                 m_planEnqueued.wait(m_lock);
             
@@ -341,9 +341,9 @@ void Worklist::runThread(ThreadData* data)
         }
         
         {
         }
         
         {
-            DeprecatedMutexLocker locker(data->m_rightToRun);
+            MutexLocker locker(data->m_rightToRun);
             {
             {
-                DeprecatedMutexLocker locker(m_lock);
+                MutexLocker locker(m_lock);
                 if (plan->stage == Plan::Cancelled) {
                     m_numberOfActiveThreads--;
                     continue;
                 if (plan->stage == Plan::Cancelled) {
                     m_numberOfActiveThreads--;
                     continue;
@@ -359,7 +359,7 @@ void Worklist::runThread(ThreadData* data)
             RELEASE_ASSERT(!plan->vm.heap.isCollecting());
             
             {
             RELEASE_ASSERT(!plan->vm.heap.isCollecting());
             
             {
-                DeprecatedMutexLocker locker(m_lock);
+                MutexLocker locker(m_lock);
                 if (plan->stage == Plan::Cancelled) {
                     m_numberOfActiveThreads--;
                     continue;
                 if (plan->stage == Plan::Cancelled) {
                     m_numberOfActiveThreads--;
                     continue;
@@ -370,7 +370,7 @@ void Worklist::runThread(ThreadData* data)
         }
 
         {
         }
 
         {
-            DeprecatedMutexLocker locker(m_lock);
+            MutexLocker locker(m_lock);
             
             // We could have been cancelled between releasing rightToRun and acquiring m_lock.
             // This would mean that we might be in the middle of GC right now.
             
             // We could have been cancelled between releasing rightToRun and acquiring m_lock.
             // This would mean that we might be in the middle of GC right now.
index 59e4f25..bd6e6fa 100644 (file)
@@ -85,7 +85,7 @@ private:
     
     void removeAllReadyPlansForVM(VM&, Vector<RefPtr<Plan>, 8>&);
 
     
     void removeAllReadyPlansForVM(VM&, Vector<RefPtr<Plan>, 8>&);
 
-    void dump(const DeprecatedMutexLocker&, PrintStream&) const;
+    void dump(const MutexLocker&, PrintStream&) const;
     
     CString m_threadName;
     
     
     CString m_threadName;
     
@@ -103,9 +103,9 @@ private:
     // be completed.
     Vector<RefPtr<Plan>, 16> m_readyPlans;
 
     // be completed.
     Vector<RefPtr<Plan>, 16> m_readyPlans;
 
-    DeprecatedMutex m_suspensionLock;
+    Mutex m_suspensionLock;
     
     
-    mutable DeprecatedMutex m_lock;
+    mutable Mutex m_lock;
     ThreadCondition m_planEnqueued;
     ThreadCondition m_planCompiled;
     
     ThreadCondition m_planEnqueued;
     ThreadCondition m_planCompiled;
     
index e11ad51..8f35742 100644 (file)
@@ -78,14 +78,14 @@ public:
     
     void enqueue(std::unique_ptr<DisassemblyTask> task)
     {
     
     void enqueue(std::unique_ptr<DisassemblyTask> task)
     {
-        DeprecatedMutexLocker locker(m_lock);
+        MutexLocker locker(m_lock);
         m_queue.append(WTF::move(task));
         m_condition.broadcast();
     }
     
     void waitUntilEmpty()
     {
         m_queue.append(WTF::move(task));
         m_condition.broadcast();
     }
     
     void waitUntilEmpty()
     {
-        DeprecatedMutexLocker locker(m_lock);
+        MutexLocker locker(m_lock);
         while (!m_queue.isEmpty() || m_working)
             m_condition.wait(m_lock);
     }
         while (!m_queue.isEmpty() || m_working)
             m_condition.wait(m_lock);
     }
@@ -96,7 +96,7 @@ private:
         for (;;) {
             std::unique_ptr<DisassemblyTask> task;
             {
         for (;;) {
             std::unique_ptr<DisassemblyTask> task;
             {
-                DeprecatedMutexLocker locker(m_lock);
+                MutexLocker locker(m_lock);
                 m_working = false;
                 m_condition.broadcast();
                 while (m_queue.isEmpty())
                 m_working = false;
                 m_condition.broadcast();
                 while (m_queue.isEmpty())
@@ -112,7 +112,7 @@ private:
         }
     }
     
         }
     }
     
-    DeprecatedMutex m_lock;
+    Mutex m_lock;
     ThreadCondition m_condition;
     Deque<std::unique_ptr<DisassemblyTask>> m_queue;
     bool m_working { false };
     ThreadCondition m_condition;
     Deque<std::unique_ptr<DisassemblyTask>> m_queue;
     bool m_working { false };
index a903362..9592eaa 100644 (file)
@@ -198,7 +198,7 @@ void CopiedSpace::doneFillingBlock(CopiedBlock* block, CopiedBlock** exchange)
     }
 
     {
     }
 
     {
-        DeprecatedMutexLocker locker(m_loanedBlocksLock);
+        MutexLocker locker(m_loanedBlocksLock);
         ASSERT(m_numberOfLoanedBlocks > 0);
         ASSERT(m_inCopyingPhase);
         m_numberOfLoanedBlocks--;
         ASSERT(m_numberOfLoanedBlocks > 0);
         ASSERT(m_inCopyingPhase);
         m_numberOfLoanedBlocks--;
@@ -231,7 +231,7 @@ void CopiedSpace::didStartFullCollection()
 void CopiedSpace::doneCopying()
 {
     {
 void CopiedSpace::doneCopying()
 {
     {
-        DeprecatedMutexLocker locker(m_loanedBlocksLock);
+        MutexLocker locker(m_loanedBlocksLock);
         while (m_numberOfLoanedBlocks > 0)
             m_loanedBlocksCondition.wait(m_loanedBlocksLock);
     }
         while (m_numberOfLoanedBlocks > 0)
             m_loanedBlocksCondition.wait(m_loanedBlocksLock);
     }
index 3d00ba1..db1be18 100644 (file)
@@ -138,7 +138,7 @@ private:
     bool m_inCopyingPhase;
     bool m_shouldDoCopyPhase;
 
     bool m_inCopyingPhase;
     bool m_shouldDoCopyPhase;
 
-    DeprecatedMutex m_loanedBlocksLock; 
+    Mutex m_loanedBlocksLock; 
     ThreadCondition m_loanedBlocksCondition;
     size_t m_numberOfLoanedBlocks;
     
     ThreadCondition m_loanedBlocksCondition;
     size_t m_numberOfLoanedBlocks;
     
index 7e35da5..3faf342 100644 (file)
@@ -113,7 +113,7 @@ inline void CopiedSpace::recycleBorrowedBlock(CopiedBlock* block)
     CopiedBlock::destroy(block);
 
     {
     CopiedBlock::destroy(block);
 
     {
-        DeprecatedMutexLocker locker(m_loanedBlocksLock);
+        MutexLocker locker(m_loanedBlocksLock);
         ASSERT(m_numberOfLoanedBlocks > 0);
         ASSERT(m_inCopyingPhase);
         m_numberOfLoanedBlocks--;
         ASSERT(m_numberOfLoanedBlocks > 0);
         ASSERT(m_inCopyingPhase);
         m_numberOfLoanedBlocks--;
@@ -128,7 +128,7 @@ inline CopiedBlock* CopiedSpace::allocateBlockForCopyingPhase()
     CopiedBlock* block = CopiedBlock::createNoZeroFill();
 
     {
     CopiedBlock* block = CopiedBlock::createNoZeroFill();
 
     {
-        DeprecatedMutexLocker locker(m_loanedBlocksLock);
+        MutexLocker locker(m_loanedBlocksLock);
         m_numberOfLoanedBlocks++;
     }
 
         m_numberOfLoanedBlocks++;
     }
 
index b2c7433..1efbb9a 100644 (file)
@@ -59,7 +59,7 @@ protected:
     RetainPtr<CFRunLoopRef> m_runLoop;
     CFRunLoopTimerContext m_context;
 
     RetainPtr<CFRunLoopRef> m_runLoop;
     CFRunLoopTimerContext m_context;
 
-    DeprecatedMutex m_shutdownMutex;
+    Mutex m_shutdownMutex;
 #elif PLATFORM(EFL)
     static bool timerEvent(void*);
     Ecore_Timer* add(double delay, void* agent);
 #elif PLATFORM(EFL)
     static bool timerEvent(void*);
     Ecore_Timer* add(double delay, void* agent);
index a694508..4ae16a9 100644 (file)
@@ -103,18 +103,18 @@ public:
         }
 
     private:
         }
 
     private:
-        DeprecatedMutexLocker m_locker;
+        MutexLocker m_locker;
     };
 
     void add(MachineThreads* machineThreads)
     {
     };
 
     void add(MachineThreads* machineThreads)
     {
-        DeprecatedMutexLocker managerLock(m_lock);
+        MutexLocker managerLock(m_lock);
         m_set.add(machineThreads);
     }
 
     void remove(MachineThreads* machineThreads)
     {
         m_set.add(machineThreads);
     }
 
     void remove(MachineThreads* machineThreads)
     {
-        DeprecatedMutexLocker managerLock(m_lock);
+        MutexLocker managerLock(m_lock);
         auto recordedMachineThreads = m_set.take(machineThreads);
         RELEASE_ASSERT(recordedMachineThreads = machineThreads);
     }
         auto recordedMachineThreads = m_set.take(machineThreads);
         RELEASE_ASSERT(recordedMachineThreads = machineThreads);
     }
@@ -129,7 +129,7 @@ private:
 
     ActiveMachineThreadsManager() { }
     
 
     ActiveMachineThreadsManager() { }
     
-    DeprecatedMutex m_lock;
+    Mutex m_lock;
     MachineThreadsSet m_set;
 
     friend ActiveMachineThreadsManager& activeMachineThreadsManager();
     MachineThreadsSet m_set;
 
     friend ActiveMachineThreadsManager& activeMachineThreadsManager();
@@ -263,7 +263,7 @@ MachineThreads::~MachineThreads()
     activeMachineThreadsManager().remove(this);
     threadSpecificKeyDelete(m_threadSpecific);
 
     activeMachineThreadsManager().remove(this);
     threadSpecificKeyDelete(m_threadSpecific);
 
-    DeprecatedMutexLocker registeredThreadsLock(m_registeredThreadsMutex);
+    MutexLocker registeredThreadsLock(m_registeredThreadsMutex);
     for (Thread* t = m_registeredThreads; t;) {
         Thread* next = t->next;
         delete t;
     for (Thread* t = m_registeredThreads; t;) {
         Thread* next = t->next;
         delete t;
@@ -294,7 +294,7 @@ void MachineThreads::addCurrentThread()
     threadSpecificSet(m_threadSpecific, this);
     Thread* thread = Thread::createForCurrentThread();
 
     threadSpecificSet(m_threadSpecific, this);
     Thread* thread = Thread::createForCurrentThread();
 
-    DeprecatedMutexLocker lock(m_registeredThreadsMutex);
+    MutexLocker lock(m_registeredThreadsMutex);
 
     thread->next = m_registeredThreads;
     m_registeredThreads = thread;
 
     thread->next = m_registeredThreads;
     m_registeredThreads = thread;
@@ -318,7 +318,7 @@ void MachineThreads::removeThread(void* p)
 template<typename PlatformThread>
 void MachineThreads::removeThreadIfFound(PlatformThread platformThread)
 {
 template<typename PlatformThread>
 void MachineThreads::removeThreadIfFound(PlatformThread platformThread)
 {
-    DeprecatedMutexLocker lock(m_registeredThreadsMutex);
+    MutexLocker lock(m_registeredThreadsMutex);
     Thread* t = m_registeredThreads;
     if (*t == platformThread) {
         m_registeredThreads = m_registeredThreads->next;
     Thread* t = m_registeredThreads;
     if (*t == platformThread) {
         m_registeredThreads = m_registeredThreads->next;
@@ -564,7 +564,7 @@ void MachineThreads::tryCopyOtherThreadStack(Thread* thread, void* buffer, size_
     thread->freeRegisters(registers);
 }
 
     thread->freeRegisters(registers);
 }
 
-bool MachineThreads::tryCopyOtherThreadStacks(DeprecatedMutexLocker&, void* buffer, size_t capacity, size_t* size)
+bool MachineThreads::tryCopyOtherThreadStacks(MutexLocker&, void* buffer, size_t capacity, size_t* size)
 {
     // Prevent two VMs from suspending each other's threads at the same time,
     // which can cause deadlock: <rdar://problem/20300842>.
 {
     // Prevent two VMs from suspending each other's threads at the same time,
     // which can cause deadlock: <rdar://problem/20300842>.
@@ -658,7 +658,7 @@ void MachineThreads::gatherConservativeRoots(ConservativeRoots& conservativeRoot
     size_t size;
     size_t capacity = 0;
     void* buffer = nullptr;
     size_t size;
     size_t capacity = 0;
     void* buffer = nullptr;
-    DeprecatedMutexLocker lock(m_registeredThreadsMutex);
+    MutexLocker lock(m_registeredThreadsMutex);
     while (!tryCopyOtherThreadStacks(lock, buffer, capacity, &size))
         growBuffer(size, &buffer, &capacity);
 
     while (!tryCopyOtherThreadStacks(lock, buffer, capacity, &size))
         growBuffer(size, &buffer, &capacity);
 
index 84a92b6..0723ad8 100644 (file)
@@ -52,14 +52,14 @@ namespace JSC {
         void gatherFromCurrentThread(ConservativeRoots&, JITStubRoutineSet&, CodeBlockSet&, void* stackOrigin, void* stackTop, RegisterState& calleeSavedRegisters);
 
         void tryCopyOtherThreadStack(Thread*, void*, size_t capacity, size_t*);
         void gatherFromCurrentThread(ConservativeRoots&, JITStubRoutineSet&, CodeBlockSet&, void* stackOrigin, void* stackTop, RegisterState& calleeSavedRegisters);
 
         void tryCopyOtherThreadStack(Thread*, void*, size_t capacity, size_t*);
-        bool tryCopyOtherThreadStacks(DeprecatedMutexLocker&, void*, size_t capacity, size_t*);
+        bool tryCopyOtherThreadStacks(MutexLocker&, void*, size_t capacity, size_t*);
 
         static void removeThread(void*);
 
         template<typename PlatformThread>
         void removeThreadIfFound(PlatformThread);
 
 
         static void removeThread(void*);
 
         template<typename PlatformThread>
         void removeThreadIfFound(PlatformThread);
 
-        DeprecatedMutex m_registeredThreadsMutex;
+        Mutex m_registeredThreadsMutex;
         Thread* m_registeredThreads;
         WTF::ThreadSpecificKey m_threadSpecific;
 #if !ASSERT_DISABLED
         Thread* m_registeredThreads;
         WTF::ThreadSpecificKey m_threadSpecific;
 #if !ASSERT_DISABLED
index 819aa86..025fef0 100644 (file)
@@ -39,9 +39,9 @@ namespace JSC {
 #if !ENABLE(JIT)
 static size_t committedBytesCount = 0;
 
 #if !ENABLE(JIT)
 static size_t committedBytesCount = 0;
 
-static DeprecatedMutex& stackStatisticsMutex()
+static Mutex& stackStatisticsMutex()
 {
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, staticMutex, ());
+    DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, staticMutex, ());
     return staticMutex;
 }    
 #endif // !ENABLE(JIT)
     return staticMutex;
 }    
 #endif // !ENABLE(JIT)
@@ -146,7 +146,7 @@ void JSStack::initializeThreading()
 
 void JSStack::addToCommittedByteCount(long byteCount)
 {
 
 void JSStack::addToCommittedByteCount(long byteCount)
 {
-    DeprecatedMutexLocker locker(stackStatisticsMutex());
+    MutexLocker locker(stackStatisticsMutex());
     ASSERT(static_cast<long>(committedBytesCount) + byteCount > -1);
     committedBytesCount += byteCount;
 }
     ASSERT(static_cast<long>(committedBytesCount) + byteCount > -1);
     committedBytesCount += byteCount;
 }
@@ -176,7 +176,7 @@ Register* JSStack::highAddress() const
 size_t JSStack::committedByteCount()
 {
 #if !ENABLE(JIT)
 size_t JSStack::committedByteCount()
 {
 #if !ENABLE(JIT)
-    DeprecatedMutexLocker locker(stackStatisticsMutex());
+    MutexLocker locker(stackStatisticsMutex());
     return committedBytesCount;
 #else
     // When using the C stack, we don't know how many stack pages are actually
     return committedBytesCount;
 #else
     // When using the C stack, we don't know how many stack pages are actually
index 801615e..64a06b5 100644 (file)
@@ -64,8 +64,8 @@ public:
 
 private:
     // Main thread can hold this lock for a while, so use an adaptive mutex.
 
 private:
     // Main thread can hold this lock for a while, so use an adaptive mutex.
-    typedef DeprecatedMutex Lock;
-    typedef DeprecatedMutexLocker Locker;
+    typedef Mutex Lock;
+    typedef MutexLocker Locker;
 
     void finalize(Handle<Unknown>, void* context) override;
     
 
     void finalize(Handle<Unknown>, void* context) override;
     
index b380e3e..7d4f3cf 100644 (file)
@@ -81,8 +81,8 @@ private:
     //   performance, but if we did have contention, we would want a sensible,
     //   power-aware backoff. An adaptive mutex will do this as a matter of course,
     //   but a spinlock won't.
     //   performance, but if we did have contention, we would want a sensible,
     //   power-aware backoff. An adaptive mutex will do this as a matter of course,
     //   but a spinlock won't.
-    typedef DeprecatedMutex Lock;
-    typedef DeprecatedMutexLocker Locker;
+    typedef Mutex Lock;
+    typedef MutexLocker Locker;
     
 
     void addDatabaseToAtExit();
     
 
     void addDatabaseToAtExit();
index fb37292..721faa1 100644 (file)
@@ -1,5 +1,110 @@
 2015-08-05  Filip Pizlo  <fpizlo@apple.com>
 
 2015-08-05  Filip Pizlo  <fpizlo@apple.com>
 
+        Unreviewed, roll out http://trac.webkit.org/changeset/187972.
+
+        * 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/ThreadSpecificWin.cpp:
+        (WTF::destructorsList):
+        (WTF::destructorsMutex):
+        (WTF::threadSpecificKeyCreate):
+        (WTF::threadSpecificKeyDelete):
+        (WTF::ThreadSpecificThreadExit):
+        * 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::Mutex::Mutex):
+        (WTF::Mutex::~Mutex):
+        (WTF::Mutex::lock):
+        (WTF::Mutex::tryLock):
+        (WTF::Mutex::unlock):
+        (WTF::ThreadCondition::~ThreadCondition):
+        (WTF::ThreadCondition::wait):
+        (WTF::ThreadCondition::timedWait):
+        (WTF::DeprecatedMutex::DeprecatedMutex): Deleted.
+        (WTF::DeprecatedMutex::~DeprecatedMutex): Deleted.
+        (WTF::DeprecatedMutex::lock): Deleted.
+        (WTF::DeprecatedMutex::tryLock): Deleted.
+        (WTF::DeprecatedMutex::unlock): Deleted.
+        * wtf/ThreadingWin.cpp:
+        (WTF::initializeCurrentThreadInternal):
+        (WTF::threadMapMutex):
+        (WTF::initializeThreading):
+        (WTF::storeThreadHandleByIdentifier):
+        (WTF::threadHandleForIdentifier):
+        (WTF::clearThreadHandleForIdentifier):
+        (WTF::currentThread):
+        (WTF::Mutex::Mutex):
+        (WTF::Mutex::~Mutex):
+        (WTF::Mutex::lock):
+        (WTF::Mutex::tryLock):
+        (WTF::Mutex::unlock):
+        (WTF::ThreadCondition::~ThreadCondition):
+        (WTF::ThreadCondition::wait):
+        (WTF::ThreadCondition::timedWait):
+        (WTF::DeprecatedMutex::DeprecatedMutex): Deleted.
+        (WTF::DeprecatedMutex::~DeprecatedMutex): Deleted.
+        (WTF::DeprecatedMutex::lock): Deleted.
+        (WTF::DeprecatedMutex::tryLock): Deleted.
+        (WTF::DeprecatedMutex::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):
+
+2015-08-05  Filip Pizlo  <fpizlo@apple.com>
+
         Unreviewed, fix Windows.
 
         * wtf/ThreadSpecificWin.cpp:
         Unreviewed, fix Windows.
 
         * wtf/ThreadSpecificWin.cpp:
index b1f7624..037ce3f 100644 (file)
 namespace WTF {
 
 static const size_t kSwapLockCount = 32;
 namespace WTF {
 
 static const size_t kSwapLockCount = 32;
-static DeprecatedMutex s_swapLocks[kSwapLockCount];
+static Mutex s_swapLocks[kSwapLockCount];
 
 
-static inline DeprecatedMutex& getSwapLock(const volatile int64_t* addr)
+static inline Mutex& getSwapLock(const volatile int64_t* addr)
 {
     return s_swapLocks[(reinterpret_cast<intptr_t>(addr) >> 3U) % kSwapLockCount];
 }
 
 static int64_t atomicStep(int64_t volatile* addend, int64_t step)
 {
 {
     return s_swapLocks[(reinterpret_cast<intptr_t>(addr) >> 3U) % kSwapLockCount];
 }
 
 static int64_t atomicStep(int64_t volatile* addend, int64_t step)
 {
-    DeprecatedMutex& mutex = getSwapLock(addend);
+    Mutex& mutex = getSwapLock(addend);
 
     mutex.lock();
     int64_t value = *addend + step;
 
     mutex.lock();
     int64_t value = *addend + step;
index a38e600..1a33d4c 100644 (file)
@@ -77,7 +77,7 @@ namespace WTF {
         static double infiniteTime() { return std::numeric_limits<double>::max(); }
 
     private:
         static double infiniteTime() { return std::numeric_limits<double>::max(); }
 
     private:
-        mutable DeprecatedMutex m_mutex;
+        mutable Mutex m_mutex;
         ThreadCondition m_condition;
         Deque<std::unique_ptr<DataType>> m_queue;
         bool m_killed;
         ThreadCondition m_condition;
         Deque<std::unique_ptr<DataType>> m_queue;
         bool m_killed;
@@ -91,7 +91,7 @@ namespace WTF {
     template<typename DataType>
     inline void MessageQueue<DataType>::append(std::unique_ptr<DataType> message)
     {
     template<typename DataType>
     inline void MessageQueue<DataType>::append(std::unique_ptr<DataType> message)
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         m_queue.append(WTF::move(message));
         m_condition.signal();
     }
         m_queue.append(WTF::move(message));
         m_condition.signal();
     }
@@ -99,7 +99,7 @@ namespace WTF {
     template<typename DataType>
     inline void MessageQueue<DataType>::appendAndKill(std::unique_ptr<DataType> message)
     {
     template<typename DataType>
     inline void MessageQueue<DataType>::appendAndKill(std::unique_ptr<DataType> message)
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         m_queue.append(WTF::move(message));
         m_killed = true;
         m_condition.broadcast();
         m_queue.append(WTF::move(message));
         m_killed = true;
         m_condition.broadcast();
@@ -109,7 +109,7 @@ namespace WTF {
     template<typename DataType>
     inline bool MessageQueue<DataType>::appendAndCheckEmpty(std::unique_ptr<DataType> message)
     {
     template<typename DataType>
     inline bool MessageQueue<DataType>::appendAndCheckEmpty(std::unique_ptr<DataType> message)
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         bool wasEmpty = m_queue.isEmpty();
         m_queue.append(WTF::move(message));
         m_condition.signal();
         bool wasEmpty = m_queue.isEmpty();
         m_queue.append(WTF::move(message));
         m_condition.signal();
@@ -119,7 +119,7 @@ namespace WTF {
     template<typename DataType>
     inline void MessageQueue<DataType>::prepend(std::unique_ptr<DataType> message)
     {
     template<typename DataType>
     inline void MessageQueue<DataType>::prepend(std::unique_ptr<DataType> message)
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         m_queue.prepend(WTF::move(message));
         m_condition.signal();
     }
         m_queue.prepend(WTF::move(message));
         m_condition.signal();
     }
@@ -137,7 +137,7 @@ namespace WTF {
     template<typename Predicate>
     inline auto MessageQueue<DataType>::waitForMessageFilteredWithTimeout(MessageQueueWaitResult& result, Predicate&& predicate, double absoluteTime) -> std::unique_ptr<DataType>
     {
     template<typename Predicate>
     inline auto MessageQueue<DataType>::waitForMessageFilteredWithTimeout(MessageQueueWaitResult& result, Predicate&& predicate, double absoluteTime) -> std::unique_ptr<DataType>
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         bool timedOut = false;
 
         auto found = m_queue.end();
         bool timedOut = false;
 
         auto found = m_queue.end();
@@ -174,7 +174,7 @@ namespace WTF {
     template<typename DataType>
     inline auto MessageQueue<DataType>::tryGetMessage() -> std::unique_ptr<DataType>
     {
     template<typename DataType>
     inline auto MessageQueue<DataType>::tryGetMessage() -> std::unique_ptr<DataType>
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         if (m_killed)
             return nullptr;
         if (m_queue.isEmpty())
         if (m_killed)
             return nullptr;
         if (m_queue.isEmpty())
@@ -186,7 +186,7 @@ namespace WTF {
     template<typename DataType>
     inline auto MessageQueue<DataType>::tryGetMessageIgnoringKilled() -> std::unique_ptr<DataType>
     {
     template<typename DataType>
     inline auto MessageQueue<DataType>::tryGetMessageIgnoringKilled() -> std::unique_ptr<DataType>
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         if (m_queue.isEmpty())
             return nullptr;
 
         if (m_queue.isEmpty())
             return nullptr;
 
@@ -197,7 +197,7 @@ namespace WTF {
     template<typename Predicate>
     inline void MessageQueue<DataType>::removeIf(Predicate&& predicate)
     {
     template<typename Predicate>
     inline void MessageQueue<DataType>::removeIf(Predicate&& predicate)
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         while (true) {
             auto found = m_queue.findIf([&predicate](const std::unique_ptr<DataType>& ptr) -> bool {
                 ASSERT(ptr);
         while (true) {
             auto found = m_queue.findIf([&predicate](const std::unique_ptr<DataType>& ptr) -> bool {
                 ASSERT(ptr);
@@ -214,7 +214,7 @@ namespace WTF {
     template<typename DataType>
     inline bool MessageQueue<DataType>::isEmpty()
     {
     template<typename DataType>
     inline bool MessageQueue<DataType>::isEmpty()
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         if (m_killed)
             return true;
         return m_queue.isEmpty();
         if (m_killed)
             return true;
         return m_queue.isEmpty();
@@ -223,7 +223,7 @@ namespace WTF {
     template<typename DataType>
     inline void MessageQueue<DataType>::kill()
     {
     template<typename DataType>
     inline void MessageQueue<DataType>::kill()
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         m_killed = true;
         m_condition.broadcast();
     }
         m_killed = true;
         m_condition.broadcast();
     }
@@ -231,7 +231,7 @@ namespace WTF {
     template<typename DataType>
     inline bool MessageQueue<DataType>::killed() const
     {
     template<typename DataType>
     inline bool MessageQueue<DataType>::killed() const
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         return m_killed;
     }
 } // namespace WTF
         return m_killed;
     }
 } // namespace WTF
index 621af57..2cc0bc6 100644 (file)
@@ -105,7 +105,7 @@ bool ParallelEnvironment::ThreadPrivate::tryLockFor(ParallelEnvironment* parent)
 
 void ParallelEnvironment::ThreadPrivate::execute(ThreadFunction threadFunction, void* parameters)
 {
 
 void ParallelEnvironment::ThreadPrivate::execute(ThreadFunction threadFunction, void* parameters)
 {
-    DeprecatedMutexLocker lock(m_mutex);
+    MutexLocker lock(m_mutex);
 
     m_threadFunction = threadFunction;
     m_parameters = parameters;
 
     m_threadFunction = threadFunction;
     m_parameters = parameters;
@@ -115,7 +115,7 @@ void ParallelEnvironment::ThreadPrivate::execute(ThreadFunction threadFunction,
 
 void ParallelEnvironment::ThreadPrivate::waitForFinish()
 {
 
 void ParallelEnvironment::ThreadPrivate::waitForFinish()
 {
-    DeprecatedMutexLocker lock(m_mutex);
+    MutexLocker lock(m_mutex);
 
     while (m_running)
         m_threadCondition.wait(m_mutex);
 
     while (m_running)
         m_threadCondition.wait(m_mutex);
@@ -124,7 +124,7 @@ void ParallelEnvironment::ThreadPrivate::waitForFinish()
 void ParallelEnvironment::ThreadPrivate::workerThread(void* threadData)
 {
     ThreadPrivate* sharedThread = reinterpret_cast<ThreadPrivate*>(threadData);
 void ParallelEnvironment::ThreadPrivate::workerThread(void* threadData)
 {
     ThreadPrivate* sharedThread = reinterpret_cast<ThreadPrivate*>(threadData);
-    DeprecatedMutexLocker lock(sharedThread->m_mutex);
+    MutexLocker lock(sharedThread->m_mutex);
 
     while (sharedThread->m_threadID) {
         if (sharedThread->m_running) {
 
     while (sharedThread->m_threadID) {
         if (sharedThread->m_running) {
index 3462630..731b960 100644 (file)
@@ -76,7 +76,7 @@ public:
         bool m_running;
         ParallelEnvironment* m_parent;
 
         bool m_running;
         ParallelEnvironment* m_parent;
 
-        mutable DeprecatedMutex m_mutex;
+        mutable Mutex m_mutex;
         ThreadCondition m_threadCondition;
 
         ThreadFunction m_threadFunction;
         ThreadCondition m_threadCondition;
 
         ThreadFunction m_threadFunction;
index ebeab75..60e26ee 100644 (file)
@@ -92,7 +92,7 @@ void RunLoop::performWork()
     {
         std::function<void()> function;
         {
     {
         std::function<void()> function;
         {
-            DeprecatedMutexLocker locker(m_functionQueueLock);
+            MutexLocker locker(m_functionQueueLock);
             functionsToHandle = m_functionQueue.size();
 
             if (m_functionQueue.isEmpty())
             functionsToHandle = m_functionQueue.size();
 
             if (m_functionQueue.isEmpty())
@@ -107,7 +107,7 @@ void RunLoop::performWork()
     for (size_t functionsHandled = 1; functionsHandled < functionsToHandle; ++functionsHandled) {
         std::function<void()> function;
         {
     for (size_t functionsHandled = 1; functionsHandled < functionsToHandle; ++functionsHandled) {
         std::function<void()> function;
         {
-            DeprecatedMutexLocker locker(m_functionQueueLock);
+            MutexLocker locker(m_functionQueueLock);
 
             // Even if we start off with N functions to handle and we've only handled less than N functions, the queue
             // still might be empty because those functions might have been handled in an inner RunLoop::performWork().
 
             // Even if we start off with N functions to handle and we've only handled less than N functions, the queue
             // still might be empty because those functions might have been handled in an inner RunLoop::performWork().
@@ -125,7 +125,7 @@ void RunLoop::performWork()
 void RunLoop::dispatch(std::function<void ()> function)
 {
     {
 void RunLoop::dispatch(std::function<void ()> function)
 {
     {
-        DeprecatedMutexLocker locker(m_functionQueueLock);
+        MutexLocker locker(m_functionQueueLock);
         m_functionQueue.append(WTF::move(function));
     }
 
         m_functionQueue.append(WTF::move(function));
     }
 
index 05ad6e3..6f30236 100644 (file)
@@ -130,7 +130,7 @@ private:
 
     void performWork();
 
 
     void performWork();
 
-    DeprecatedMutex m_functionQueueLock;
+    Mutex m_functionQueueLock;
     Deque<std::function<void ()>> m_functionQueue;
 
 #if PLATFORM(WIN)
     Deque<std::function<void ()>> m_functionQueue;
 
 #if PLATFORM(WIN)
@@ -147,10 +147,10 @@ private:
     RetainPtr<CFRunLoopSourceRef> m_runLoopSource;
     int m_nestingLevel;
 #elif PLATFORM(EFL)
     RetainPtr<CFRunLoopSourceRef> m_runLoopSource;
     int m_nestingLevel;
 #elif PLATFORM(EFL)
-    DeprecatedMutex m_pipeLock;
+    Mutex m_pipeLock;
     EflUniquePtr<Ecore_Pipe> m_pipe;
 
     EflUniquePtr<Ecore_Pipe> m_pipe;
 
-    DeprecatedMutex m_wakeUpEventRequestedLock;
+    Mutex m_wakeUpEventRequestedLock;
     bool m_wakeUpEventRequested;
 
     static void wakeUpEvent(void* data, void*, unsigned);
     bool m_wakeUpEventRequested;
 
     static void wakeUpEvent(void* data, void*, unsigned);
index 385ba9f..9b70bbb 100644 (file)
@@ -38,9 +38,9 @@ static DoublyLinkedList<PlatformThreadSpecificKey>& destructorsList()
     return staticList;
 }
 
     return staticList;
 }
 
-static DeprecatedMutex& destructorsMutex()
+static Mutex& destructorsMutex()
 {
 {
-    static DeprecatedMutex staticMutex;
+    static Mutex staticMutex;
     return staticMutex;
 }
 
     return staticMutex;
 }
 
@@ -95,13 +95,13 @@ void threadSpecificKeyCreate(ThreadSpecificKey* key, void (*destructor)(void *))
     *key = static_cast<PlatformThreadSpecificKey*>(::malloc(sizeof(PlatformThreadSpecificKey)));
     new (*key) PlatformThreadSpecificKey(destructor);
 
     *key = static_cast<PlatformThreadSpecificKey*>(::malloc(sizeof(PlatformThreadSpecificKey)));
     new (*key) PlatformThreadSpecificKey(destructor);
 
-    DeprecatedMutexLocker locker(destructorsMutex());
+    MutexLocker locker(destructorsMutex());
     destructorsList().push(*key);
 }
 
 void threadSpecificKeyDelete(ThreadSpecificKey key)
 {
     destructorsList().push(*key);
 }
 
 void threadSpecificKeyDelete(ThreadSpecificKey key)
 {
-    DeprecatedMutexLocker locker(destructorsMutex());
+    MutexLocker locker(destructorsMutex());
     destructorsList().remove(key);
     key->~PlatformThreadSpecificKey();
     ::free(key);
     destructorsList().remove(key);
     key->~PlatformThreadSpecificKey();
     ::free(key);
@@ -126,7 +126,7 @@ void ThreadSpecificThreadExit()
             data->destructor(data);
     }
 
             data->destructor(data);
     }
 
-    DeprecatedMutexLocker locker(destructorsMutex());
+    MutexLocker locker(destructorsMutex());
     PlatformThreadSpecificKey* key = destructorsList().head();
     while (key) {
         PlatformThreadSpecificKey* nextKey = key->next();
     PlatformThreadSpecificKey* key = destructorsList().head();
     while (key) {
         PlatformThreadSpecificKey* nextKey = key->next();
index 13cb014..1776598 100644 (file)
@@ -35,7 +35,7 @@ struct NewThreadContext {
 public:
     const char* name;
     std::function<void()> entryPoint;
 public:
     const char* name;
     std::function<void()> entryPoint;
-    DeprecatedMutex creationMutex;
+    Mutex creationMutex;
 };
 
 static void threadEntryPoint(void* contextData)
 };
 
 static void threadEntryPoint(void* contextData)
@@ -45,7 +45,7 @@ static void threadEntryPoint(void* contextData)
     // Block until our creating thread has completed any extra setup work, including
     // establishing ThreadIdentifier.
     {
     // Block until our creating thread has completed any extra setup work, including
     // establishing ThreadIdentifier.
     {
-        DeprecatedMutexLocker locker(context->creationMutex);
+        MutexLocker locker(context->creationMutex);
     }
 
     initializeCurrentThreadInternal(context->name);
     }
 
     initializeCurrentThreadInternal(context->name);
@@ -70,7 +70,7 @@ ThreadIdentifier createThread(const char* name, std::function<void()> entryPoint
     NewThreadContext* context = new NewThreadContext { name, WTF::move(entryPoint), { } };
 
     // Prevent the thread body from executing until we've established the thread identifier.
     NewThreadContext* context = new NewThreadContext { name, WTF::move(entryPoint), { } };
 
     // Prevent the thread body from executing until we've established the thread identifier.
-    DeprecatedMutexLocker locker(context->creationMutex);
+    MutexLocker locker(context->creationMutex);
 
     return createThreadInternal(threadEntryPoint, context, name);
 }
 
     return createThreadInternal(threadEntryPoint, context, name);
 }
index 236f010..4229231 100644 (file)
@@ -70,11 +70,11 @@ typedef void* PlatformMutex;
 typedef void* PlatformCondition;
 #endif
     
 typedef void* PlatformCondition;
 #endif
     
-class DeprecatedMutex {
-    WTF_MAKE_NONCOPYABLE(DeprecatedMutex); WTF_MAKE_FAST_ALLOCATED;
+class Mutex {
+    WTF_MAKE_NONCOPYABLE(Mutex); WTF_MAKE_FAST_ALLOCATED;
 public:
 public:
-    WTF_EXPORT_PRIVATE DeprecatedMutex();
-    WTF_EXPORT_PRIVATE ~DeprecatedMutex();
+    WTF_EXPORT_PRIVATE Mutex();
+    WTF_EXPORT_PRIVATE ~Mutex();
 
     WTF_EXPORT_PRIVATE void lock();
     WTF_EXPORT_PRIVATE bool tryLock();
 
     WTF_EXPORT_PRIVATE void lock();
     WTF_EXPORT_PRIVATE bool tryLock();
@@ -86,7 +86,7 @@ private:
     PlatformMutex m_mutex;
 };
 
     PlatformMutex m_mutex;
 };
 
-typedef Locker<DeprecatedMutex> DeprecatedMutexLocker;
+typedef Locker<Mutex> MutexLocker;
 
 class ThreadCondition {
     WTF_MAKE_NONCOPYABLE(ThreadCondition);
 
 class ThreadCondition {
     WTF_MAKE_NONCOPYABLE(ThreadCondition);
@@ -94,10 +94,10 @@ public:
     WTF_EXPORT_PRIVATE ThreadCondition();
     WTF_EXPORT_PRIVATE ~ThreadCondition();
     
     WTF_EXPORT_PRIVATE ThreadCondition();
     WTF_EXPORT_PRIVATE ~ThreadCondition();
     
-    WTF_EXPORT_PRIVATE void wait(DeprecatedMutex&);
+    WTF_EXPORT_PRIVATE void wait(Mutex& mutex);
     // Returns true if the condition was signaled before absoluteTime, false if the absoluteTime was reached or is in the past.
     // The absoluteTime is in seconds, starting on January 1, 1970. The time is assumed to use the same time zone as WTF::currentTime().
     // Returns true if the condition was signaled before absoluteTime, false if the absoluteTime was reached or is in the past.
     // The absoluteTime is in seconds, starting on January 1, 1970. The time is assumed to use the same time zone as WTF::currentTime().
-    WTF_EXPORT_PRIVATE bool timedWait(DeprecatedMutex&, double absoluteTime);
+    WTF_EXPORT_PRIVATE bool timedWait(Mutex&, double absoluteTime);
     WTF_EXPORT_PRIVATE void signal();
     WTF_EXPORT_PRIVATE void broadcast();
     
     WTF_EXPORT_PRIVATE void signal();
     WTF_EXPORT_PRIVATE void broadcast();
     
@@ -113,8 +113,8 @@ WTF_EXPORT_PRIVATE DWORD absoluteTimeToWaitTimeoutInterval(double absoluteTime);
 
 } // namespace WTF
 
 
 } // namespace WTF
 
-using WTF::DeprecatedMutex;
-using WTF::DeprecatedMutexLocker;
+using WTF::Mutex;
+using WTF::MutexLocker;
 using WTF::ThreadCondition;
 
 #if OS(WINDOWS)
 using WTF::ThreadCondition;
 
 #if OS(WINDOWS)
index a1ae181..106ed96 100644 (file)
@@ -102,9 +102,9 @@ void unsafeThreadWasDetached(ThreadIdentifier);
 void threadDidExit(ThreadIdentifier);
 void threadWasJoined(ThreadIdentifier);
 
 void threadDidExit(ThreadIdentifier);
 void threadWasJoined(ThreadIdentifier);
 
-static DeprecatedMutex& threadMapMutex()
+static Mutex& threadMapMutex()
 {
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, mutex, ());
+    DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, mutex, ());
     return mutex;
 }
 
     return mutex;
 }
 
@@ -126,7 +126,7 @@ void initializeThreading()
     ThreadIdentifierData::initializeOnce();
     StackStats::initialize();
     wtfThreadData();
     ThreadIdentifierData::initializeOnce();
     StackStats::initialize();
     wtfThreadData();
-    s_dtoaP5Mutex = new DeprecatedMutex;
+    s_dtoaP5Mutex = new Mutex;
     initializeDates();
 }
 
     initializeDates();
 }
 
@@ -138,7 +138,7 @@ static ThreadMap& threadMap()
 
 static ThreadIdentifier identifierByPthreadHandle(const pthread_t& pthreadHandle)
 {
 
 static ThreadIdentifier identifierByPthreadHandle(const pthread_t& pthreadHandle)
 {
-    DeprecatedMutexLocker locker(threadMapMutex());
+    MutexLocker locker(threadMapMutex());
 
     ThreadMap::iterator i = threadMap().begin();
     for (; i != threadMap().end(); ++i) {
 
     ThreadMap::iterator i = threadMap().begin();
     for (; i != threadMap().end(); ++i) {
@@ -152,7 +152,7 @@ static ThreadIdentifier identifierByPthreadHandle(const pthread_t& pthreadHandle
 static ThreadIdentifier establishIdentifierForPthreadHandle(const pthread_t& pthreadHandle)
 {
     ASSERT(!identifierByPthreadHandle(pthreadHandle));
 static ThreadIdentifier establishIdentifierForPthreadHandle(const pthread_t& pthreadHandle)
 {
     ASSERT(!identifierByPthreadHandle(pthreadHandle));
-    DeprecatedMutexLocker locker(threadMapMutex());
+    MutexLocker locker(threadMapMutex());
     static ThreadIdentifier identifierCount = 1;
     threadMap().add(identifierCount, std::make_unique<PthreadState>(pthreadHandle));
     return identifierCount++;
     static ThreadIdentifier identifierCount = 1;
     threadMap().add(identifierCount, std::make_unique<PthreadState>(pthreadHandle));
     return identifierCount++;
@@ -219,7 +219,7 @@ void changeThreadPriority(ThreadIdentifier threadID, int delta)
     ASSERT(threadID);
 
     {
     ASSERT(threadID);
 
     {
-        DeprecatedMutexLocker locker(threadMapMutex());
+        MutexLocker locker(threadMapMutex());
         pthreadHandle = pthreadHandleForIdentifierWithLockAlreadyHeld(threadID);
         ASSERT(pthreadHandle);
     }
         pthreadHandle = pthreadHandleForIdentifierWithLockAlreadyHeld(threadID);
         ASSERT(pthreadHandle);
     }
@@ -242,7 +242,7 @@ int waitForThreadCompletion(ThreadIdentifier threadID)
 
     {
         // We don't want to lock across the call to join, since that can block our thread and cause deadlock.
 
     {
         // We don't want to lock across the call to join, since that can block our thread and cause deadlock.
-        DeprecatedMutexLocker locker(threadMapMutex());
+        MutexLocker locker(threadMapMutex());
         pthreadHandle = pthreadHandleForIdentifierWithLockAlreadyHeld(threadID);
         ASSERT(pthreadHandle);
     }
         pthreadHandle = pthreadHandleForIdentifierWithLockAlreadyHeld(threadID);
         ASSERT(pthreadHandle);
     }
@@ -254,7 +254,7 @@ int waitForThreadCompletion(ThreadIdentifier threadID)
     else if (joinResult)
         LOG_ERROR("ThreadIdentifier %u was unable to be joined.\n", threadID);
 
     else if (joinResult)
         LOG_ERROR("ThreadIdentifier %u was unable to be joined.\n", threadID);
 
-    DeprecatedMutexLocker locker(threadMapMutex());
+    MutexLocker locker(threadMapMutex());
     PthreadState* state = threadMap().get(threadID);
     ASSERT(state);
     ASSERT(state->joinableState() == PthreadState::Joinable);
     PthreadState* state = threadMap().get(threadID);
     ASSERT(state);
     ASSERT(state->joinableState() == PthreadState::Joinable);
@@ -273,7 +273,7 @@ void detachThread(ThreadIdentifier threadID)
 {
     ASSERT(threadID);
 
 {
     ASSERT(threadID);
 
-    DeprecatedMutexLocker locker(threadMapMutex());
+    MutexLocker locker(threadMapMutex());
     pthread_t pthreadHandle = pthreadHandleForIdentifierWithLockAlreadyHeld(threadID);
     ASSERT(pthreadHandle);
 
     pthread_t pthreadHandle = pthreadHandleForIdentifierWithLockAlreadyHeld(threadID);
     ASSERT(pthreadHandle);
 
@@ -291,7 +291,7 @@ void detachThread(ThreadIdentifier threadID)
 
 void threadDidExit(ThreadIdentifier threadID)
 {
 
 void threadDidExit(ThreadIdentifier threadID)
 {
-    DeprecatedMutexLocker locker(threadMapMutex());
+    MutexLocker locker(threadMapMutex());
     PthreadState* state = threadMap().get(threadID);
     ASSERT(state);
     
     PthreadState* state = threadMap().get(threadID);
     ASSERT(state);
     
@@ -313,7 +313,7 @@ ThreadIdentifier currentThread()
     return id;
 }
 
     return id;
 }
 
-DeprecatedMutex::DeprecatedMutex()
+Mutex::Mutex()
 {
     pthread_mutexattr_t attr;
     pthread_mutexattr_init(&attr);
 {
     pthread_mutexattr_t attr;
     pthread_mutexattr_init(&attr);
@@ -325,19 +325,19 @@ DeprecatedMutex::DeprecatedMutex()
     pthread_mutexattr_destroy(&attr);
 }
 
     pthread_mutexattr_destroy(&attr);
 }
 
-DeprecatedMutex::~DeprecatedMutex()
+Mutex::~Mutex()
 {
     int result = pthread_mutex_destroy(&m_mutex);
     ASSERT_UNUSED(result, !result);
 }
 
 {
     int result = pthread_mutex_destroy(&m_mutex);
     ASSERT_UNUSED(result, !result);
 }
 
-void DeprecatedMutex::lock()
+void Mutex::lock()
 {
     int result = pthread_mutex_lock(&m_mutex);
     ASSERT_UNUSED(result, !result);
 }
 
 {
     int result = pthread_mutex_lock(&m_mutex);
     ASSERT_UNUSED(result, !result);
 }
 
-bool DeprecatedMutex::tryLock()
+bool Mutex::tryLock()
 {
     int result = pthread_mutex_trylock(&m_mutex);
 
 {
     int result = pthread_mutex_trylock(&m_mutex);
 
@@ -350,7 +350,7 @@ bool DeprecatedMutex::tryLock()
     return false;
 }
 
     return false;
 }
 
-void DeprecatedMutex::unlock()
+void Mutex::unlock()
 {
     int result = pthread_mutex_unlock(&m_mutex);
     ASSERT_UNUSED(result, !result);
 {
     int result = pthread_mutex_unlock(&m_mutex);
     ASSERT_UNUSED(result, !result);
@@ -366,13 +366,13 @@ ThreadCondition::~ThreadCondition()
     pthread_cond_destroy(&m_condition);
 }
     
     pthread_cond_destroy(&m_condition);
 }
     
-void ThreadCondition::wait(DeprecatedMutex& mutex)
+void ThreadCondition::wait(Mutex& mutex)
 {
     int result = pthread_cond_wait(&m_condition, &mutex.impl());
     ASSERT_UNUSED(result, !result);
 }
 
 {
     int result = pthread_cond_wait(&m_condition, &mutex.impl());
     ASSERT_UNUSED(result, !result);
 }
 
-bool ThreadCondition::timedWait(DeprecatedMutex& mutex, double absoluteTime)
+bool ThreadCondition::timedWait(Mutex& mutex, double absoluteTime)
 {
     if (absoluteTime < currentTime())
         return false;
 {
     if (absoluteTime < currentTime())
         return false;
index e760516..ea4bd43 100644 (file)
@@ -143,9 +143,9 @@ void initializeCurrentThreadInternal(const char* szThreadName)
 #endif
 }
 
 #endif
 }
 
-static DeprecatedMutex& threadMapMutex()
+static Mutex& threadMapMutex()
 {
 {
-    static DeprecatedMutex mutex;
+    static Mutex mutex;
     return mutex;
 }
 
     return mutex;
 }
 
@@ -165,7 +165,7 @@ void initializeThreading()
     threadMapMutex();
     initializeRandomNumberGenerator();
     wtfThreadData();
     threadMapMutex();
     initializeRandomNumberGenerator();
     wtfThreadData();
-    s_dtoaP5Mutex = new DeprecatedMutex;
+    s_dtoaP5Mutex = new Mutex;
     initializeDates();
 }
 
     initializeDates();
 }
 
@@ -177,20 +177,20 @@ static HashMap<DWORD, HANDLE>& threadMap()
 
 static void storeThreadHandleByIdentifier(DWORD threadID, HANDLE threadHandle)
 {
 
 static void storeThreadHandleByIdentifier(DWORD threadID, HANDLE threadHandle)
 {
-    DeprecatedMutexLocker locker(threadMapMutex());
+    MutexLocker locker(threadMapMutex());
     ASSERT(!threadMap().contains(threadID));
     threadMap().add(threadID, threadHandle);
 }
 
 static HANDLE threadHandleForIdentifier(ThreadIdentifier id)
 {
     ASSERT(!threadMap().contains(threadID));
     threadMap().add(threadID, threadHandle);
 }
 
 static HANDLE threadHandleForIdentifier(ThreadIdentifier id)
 {
-    DeprecatedMutexLocker locker(threadMapMutex());
+    MutexLocker locker(threadMapMutex());
     return threadMap().get(id);
 }
 
 static void clearThreadHandleForIdentifier(ThreadIdentifier id)
 {
     return threadMap().get(id);
 }
 
 static void clearThreadHandleForIdentifier(ThreadIdentifier id)
 {
-    DeprecatedMutexLocker locker(threadMapMutex());
+    MutexLocker locker(threadMapMutex());
     ASSERT(threadMap().contains(id));
     threadMap().remove(id);
 }
     ASSERT(threadMap().contains(id));
     threadMap().remove(id);
 }
@@ -277,25 +277,25 @@ ThreadIdentifier currentThread()
     return static_cast<ThreadIdentifier>(GetCurrentThreadId());
 }
 
     return static_cast<ThreadIdentifier>(GetCurrentThreadId());
 }
 
-DeprecatedMutex::DeprecatedMutex()
+Mutex::Mutex()
 {
     m_mutex.m_recursionCount = 0;
     InitializeCriticalSection(&m_mutex.m_internalMutex);
 }
 
 {
     m_mutex.m_recursionCount = 0;
     InitializeCriticalSection(&m_mutex.m_internalMutex);
 }
 
-DeprecatedMutex::~DeprecatedMutex()
+Mutex::~Mutex()
 {
     DeleteCriticalSection(&m_mutex.m_internalMutex);
 }
 
 {
     DeleteCriticalSection(&m_mutex.m_internalMutex);
 }
 
-void DeprecatedMutex::lock()
+void Mutex::lock()
 {
     EnterCriticalSection(&m_mutex.m_internalMutex);
     ++m_mutex.m_recursionCount;
 }
     
 #pragma warning(suppress: 26115)
 {
     EnterCriticalSection(&m_mutex.m_internalMutex);
     ++m_mutex.m_recursionCount;
 }
     
 #pragma warning(suppress: 26115)
-bool DeprecatedMutex::tryLock()
+bool Mutex::tryLock()
 {
     // This method is modeled after the behavior of pthread_mutex_trylock,
     // which will return an error if the lock is already owned by the
 {
     // This method is modeled after the behavior of pthread_mutex_trylock,
     // which will return an error if the lock is already owned by the
@@ -321,7 +321,7 @@ bool DeprecatedMutex::tryLock()
     return false;
 }
 
     return false;
 }
 
-void DeprecatedMutex::unlock()
+void Mutex::unlock()
 {
     ASSERT(m_mutex.m_recursionCount);
     --m_mutex.m_recursionCount;
 {
     ASSERT(m_mutex.m_recursionCount);
     --m_mutex.m_recursionCount;
@@ -458,12 +458,12 @@ ThreadCondition::~ThreadCondition()
     CloseHandle(m_condition.m_unblockLock);
 }
 
     CloseHandle(m_condition.m_unblockLock);
 }
 
-void ThreadCondition::wait(DeprecatedMutex& mutex)
+void ThreadCondition::wait(Mutex& mutex)
 {
     m_condition.timedWait(mutex.impl(), INFINITE);
 }
 
 {
     m_condition.timedWait(mutex.impl(), INFINITE);
 }
 
-bool ThreadCondition::timedWait(DeprecatedMutex& mutex, double absoluteTime)
+bool ThreadCondition::timedWait(Mutex& mutex, double absoluteTime)
 {
     DWORD interval = absoluteTimeToWaitTimeoutInterval(absoluteTime);
 
 {
     DWORD interval = absoluteTimeToWaitTimeoutInterval(absoluteTime);
 
index bed9214..6851c09 100644 (file)
@@ -113,10 +113,10 @@ private:
 #elif OS(WINDOWS)
     volatile LONG m_isWorkThreadRegistered;
 
 #elif OS(WINDOWS)
     volatile LONG m_isWorkThreadRegistered;
 
-    DeprecatedMutex m_workItemQueueLock;
+    Mutex m_workItemQueueLock;
     Vector<RefPtr<WorkItemWin>> m_workItemQueue;
 
     Vector<RefPtr<WorkItemWin>> m_workItemQueue;
 
-    DeprecatedMutex m_handlesLock;
+    Mutex m_handlesLock;
     HashMap<HANDLE, RefPtr<HandleWorkItem>> m_handles;
 
     HANDLE m_timerQueue;
     HashMap<HANDLE, RefPtr<HandleWorkItem>> m_handles;
 
     HANDLE m_timerQueue;
index 05fddfc..48de25b 100644 (file)
@@ -54,7 +54,7 @@
 
 namespace WTF {
 
 
 namespace WTF {
 
-DeprecatedMutex* s_dtoaP5Mutex;
+Mutex* s_dtoaP5Mutex;
 
 typedef union {
     double d;
 
 typedef union {
     double d;
index e8f185f..fab840e 100644 (file)
@@ -28,9 +28,9 @@
 
 namespace WTF {
 
 
 namespace WTF {
 
-class DeprecatedMutex;
+class Mutex;
 
 
-extern DeprecatedMutex* s_dtoaP5Mutex;
+extern Mutex* s_dtoaP5Mutex;
 
 typedef char DtoaBuffer[80];
 
 
 typedef char DtoaBuffer[80];
 
index 83e2b75..4547ac2 100644 (file)
@@ -95,7 +95,7 @@ DispatchQueue::~DispatchQueue()
 void DispatchQueue::dispatch(std::unique_ptr<WorkItem> item)
 {
     {
 void DispatchQueue::dispatch(std::unique_ptr<WorkItem> item)
 {
     {
-        DeprecatedMutexLocker locker(m_workItemsLock);
+        MutexLocker locker(m_workItemsLock);
         m_workItems.append(WTF::move(item));
     }
 
         m_workItems.append(WTF::move(item));
     }
 
@@ -146,7 +146,7 @@ void DispatchQueue::performWork()
         Vector<std::unique_ptr<WorkItem>> workItems;
 
         {
         Vector<std::unique_ptr<WorkItem>> workItems;
 
         {
-            DeprecatedMutexLocker locker(m_workItemsLock);
+            MutexLocker locker(m_workItemsLock);
             if (m_workItems.isEmpty())
                 return;
 
             if (m_workItems.isEmpty())
                 return;
 
@@ -164,7 +164,7 @@ void DispatchQueue::performTimerWork()
 
     {
         // Protects m_timerWorkItems.
 
     {
         // Protects m_timerWorkItems.
-        DeprecatedMutexLocker locker(m_timerWorkItemsLock);
+        MutexLocker locker(m_timerWorkItemsLock);
         if (m_timerWorkItems.isEmpty())
             return;
 
         if (m_timerWorkItems.isEmpty())
             return;
 
@@ -209,7 +209,7 @@ void DispatchQueue::insertTimerWorkItem(std::unique_ptr<TimerWorkItem> item)
 
     size_t position = 0;
 
 
     size_t position = 0;
 
-    DeprecatedMutexLocker locker(m_timerWorkItemsLock);
+    MutexLocker locker(m_timerWorkItemsLock);
     // The items should be ordered by expire time.
     for (; position < m_timerWorkItems.size(); ++position)
         if (item->expirationTimeNanoSeconds() < m_timerWorkItems[position]->expirationTimeNanoSeconds())
     // The items should be ordered by expire time.
     for (; position < m_timerWorkItems.size(); ++position)
         if (item->expirationTimeNanoSeconds() < m_timerWorkItems[position]->expirationTimeNanoSeconds())
@@ -229,14 +229,14 @@ void DispatchQueue::dispatchQueueThread()
 
 void DispatchQueue::wakeUpThread()
 {
 
 void DispatchQueue::wakeUpThread()
 {
-    DeprecatedMutexLocker locker(m_writeToPipeDescriptorLock);
+    MutexLocker locker(m_writeToPipeDescriptorLock);
     if (write(m_writeToPipeDescriptor, &wakeUpThreadMessage, sizeof(char)) == -1)
         LOG_ERROR("Failed to wake up DispatchQueue Thread");
 }
 
 timeval* DispatchQueue::getNextTimeOut() const
 {
     if (write(m_writeToPipeDescriptor, &wakeUpThreadMessage, sizeof(char)) == -1)
         LOG_ERROR("Failed to wake up DispatchQueue Thread");
 }
 
 timeval* DispatchQueue::getNextTimeOut() const
 {
-    DeprecatedMutexLocker locker(m_timerWorkItemsLock);
+    MutexLocker locker(m_timerWorkItemsLock);
     if (m_timerWorkItems.isEmpty())
         return 0;
 
     if (m_timerWorkItems.isEmpty())
         return 0;
 
index a06db85..fc55519 100644 (file)
@@ -63,7 +63,7 @@ private:
     int m_maxFileDescriptor;
     int m_readFromPipeDescriptor;
     int m_writeToPipeDescriptor;
     int m_maxFileDescriptor;
     int m_readFromPipeDescriptor;
     int m_writeToPipeDescriptor;
-    DeprecatedMutex m_writeToPipeDescriptorLock;
+    Mutex m_writeToPipeDescriptorLock;
 
     bool m_isThreadRunning;
 
 
     bool m_isThreadRunning;
 
@@ -71,10 +71,10 @@ private:
     std::function<void ()> m_socketEventHandler;
 
     Vector<std::unique_ptr<WorkItem>> m_workItems;
     std::function<void ()> m_socketEventHandler;
 
     Vector<std::unique_ptr<WorkItem>> m_workItems;
-    DeprecatedMutex m_workItemsLock;
+    Mutex m_workItemsLock;
 
     Vector<std::unique_ptr<TimerWorkItem>> m_timerWorkItems;
 
     Vector<std::unique_ptr<TimerWorkItem>> m_timerWorkItems;
-    mutable DeprecatedMutex m_timerWorkItemsLock;
+    mutable Mutex m_timerWorkItemsLock;
 };
 
 #endif // DispatchQueueEfl_h
 };
 
 #endif // DispatchQueueEfl_h
index 3907679..5dfc290 100644 (file)
@@ -59,7 +59,7 @@ void RunLoop::wakeUpEvent(void* data, void*, unsigned)
     RunLoop* loop = static_cast<RunLoop*>(data);
 
     {
     RunLoop* loop = static_cast<RunLoop*>(data);
 
     {
-        DeprecatedMutexLocker locker(loop->m_wakeUpEventRequestedLock);
+        MutexLocker locker(loop->m_wakeUpEventRequestedLock);
         loop->m_wakeUpEventRequested = false;
     }
 
         loop->m_wakeUpEventRequested = false;
     }
 
@@ -69,14 +69,14 @@ void RunLoop::wakeUpEvent(void* data, void*, unsigned)
 void RunLoop::wakeUp()
 {
     {
 void RunLoop::wakeUp()
 {
     {
-        DeprecatedMutexLocker locker(m_wakeUpEventRequestedLock);
+        MutexLocker locker(m_wakeUpEventRequestedLock);
         if (m_wakeUpEventRequested)
             return;
         m_wakeUpEventRequested = true;
     }
 
     {
         if (m_wakeUpEventRequested)
             return;
         m_wakeUpEventRequested = true;
     }
 
     {
-        DeprecatedMutexLocker locker(m_pipeLock);
+        MutexLocker locker(m_pipeLock);
         ecore_pipe_write(m_pipe.get(), wakupEcorePipeMessage, ecorePipeMessageSize);
     }
 }
         ecore_pipe_write(m_pipe.get(), wakupEcorePipeMessage, ecorePipeMessageSize);
     }
 }
index 2435123..b7019da 100644 (file)
@@ -39,7 +39,7 @@ BinarySemaphore::~BinarySemaphore()
 
 void BinarySemaphore::signal()
 {
 
 void BinarySemaphore::signal()
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     m_isSet = true;
     m_condition.signal();
 
     m_isSet = true;
     m_condition.signal();
@@ -47,7 +47,7 @@ void BinarySemaphore::signal()
 
 bool BinarySemaphore::wait(double absoluteTime)
 {
 
 bool BinarySemaphore::wait(double absoluteTime)
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     bool timedOut = false;
     while (!m_isSet) {
 
     bool timedOut = false;
     while (!m_isSet) {
index ab667fe..b5db5d7 100644 (file)
@@ -44,7 +44,7 @@ public:
 private:
     bool m_isSet;
 
 private:
     bool m_isSet;
 
-    DeprecatedMutex m_mutex;
+    Mutex m_mutex;
     ThreadCondition m_condition;
 };
 
     ThreadCondition m_condition;
 };
 
index 0da00fe..aee15fd 100644 (file)
@@ -41,7 +41,7 @@ void WorkQueue::handleCallback(void* context, BOOLEAN timerOrWaitFired)
     RefPtr<WorkQueue> queue = item->queue();
 
     {
     RefPtr<WorkQueue> queue = item->queue();
 
     {
-        DeprecatedMutexLocker lock(queue->m_workItemQueueLock);
+        MutexLocker lock(queue->m_workItemQueueLock);
         queue->m_workItemQueue.append(item);
 
         // If no other thread is performing work, we can do it on this thread.
         queue->m_workItemQueue.append(item);
 
         // If no other thread is performing work, we can do it on this thread.
@@ -120,7 +120,7 @@ void WorkQueue::unregisterAsWorkThread()
 void WorkQueue::platformInvalidate()
 {
 #if !ASSERT_DISABLED
 void WorkQueue::platformInvalidate()
 {
 #if !ASSERT_DISABLED
-    DeprecatedMutexLocker lock(m_handlesLock);
+    MutexLocker lock(m_handlesLock);
     ASSERT(m_handles.isEmpty());
 #endif
 
     ASSERT(m_handles.isEmpty());
 #endif
 
@@ -131,7 +131,7 @@ void WorkQueue::platformInvalidate()
 
 void WorkQueue::dispatch(std::function<void()> function)
 {
 
 void WorkQueue::dispatch(std::function<void()> function)
 {
-    DeprecatedMutexLocker locker(m_workItemQueueLock);
+    MutexLocker locker(m_workItemQueueLock);
     ref();
     m_workItemQueue.append(WorkItemWin::create(function, this));
 
     ref();
     m_workItemQueue.append(WorkItemWin::create(function, this));
 
@@ -150,7 +150,7 @@ struct TimerContext : public ThreadSafeRefCounted<TimerContext> {
 
     WorkQueue* queue;
     std::function<void()> function;
 
     WorkQueue* queue;
     std::function<void()> function;
-    DeprecatedMutex timerMutex;
+    Mutex timerMutex;
     HANDLE timer;
 
 private:
     HANDLE timer;
 
 private:
@@ -171,7 +171,7 @@ void WorkQueue::timerCallback(void* context, BOOLEAN timerOrWaitFired)
 
     timerContext->queue->dispatch(timerContext->function);
 
 
     timerContext->queue->dispatch(timerContext->function);
 
-    DeprecatedMutexLocker lock(timerContext->timerMutex);
+    MutexLocker lock(timerContext->timerMutex);
     ASSERT(timerContext->timer);
     ASSERT(timerContext->queue->m_timerQueue);
     if (!::DeleteTimerQueueTimer(timerContext->queue->m_timerQueue, timerContext->timer, 0)) {
     ASSERT(timerContext->timer);
     ASSERT(timerContext->queue->m_timerQueue);
     if (!::DeleteTimerQueueTimer(timerContext->queue->m_timerQueue, timerContext->timer, 0)) {
@@ -193,7 +193,7 @@ void WorkQueue::dispatchAfter(std::chrono::nanoseconds duration, std::function<v
         // The timer callback could fire before ::CreateTimerQueueTimer even returns, so we protect
         // context->timer with a mutex to ensure the timer callback doesn't access it before the
         // timer handle has been stored in it.
         // The timer callback could fire before ::CreateTimerQueueTimer even returns, so we protect
         // context->timer with a mutex to ensure the timer callback doesn't access it before the
         // timer handle has been stored in it.
-        DeprecatedMutexLocker lock(context->timerMutex);
+        MutexLocker lock(context->timerMutex);
 
         // Since our timer callback is quick, we can execute in the timer thread itself and avoid
         // an extra thread switch over to a worker thread.
 
         // Since our timer callback is quick, we can execute in the timer thread itself and avoid
         // an extra thread switch over to a worker thread.
index 42e8857..4c5e719 100644 (file)
@@ -1,3 +1,265 @@
+2015-08-05  Filip Pizlo  <fpizlo@apple.com>
+
+        Unreviewed, roll out http://trac.webkit.org/changeset/187972.
+
+        * 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/DatabaseTask.h:
+        * Modules/webdatabase/DatabaseThread.cpp:
+        (WebCore::DatabaseThread::start):
+        (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::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::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::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:
+
 2015-08-05  Anders Carlsson  <andersca@apple.com>
 
         Move more functions from DatabaseBackendBase to Database
 2015-08-05  Anders Carlsson  <andersca@apple.com>
 
         Move more functions from DatabaseBackendBase to Database
index 47b66e3..b467d18 100644 (file)
@@ -38,7 +38,7 @@ namespace WebCore {
 AsyncAudioDecoder::AsyncAudioDecoder()
 {
     // Start worker thread.
 AsyncAudioDecoder::AsyncAudioDecoder()
 {
     // Start worker thread.
-    DeprecatedMutexLocker lock(m_threadCreationMutex);
+    MutexLocker lock(m_threadCreationMutex);
     m_threadID = createThread(AsyncAudioDecoder::threadEntry, this, "Audio Decoder");
 }
 
     m_threadID = createThread(AsyncAudioDecoder::threadEntry, this, "Audio Decoder");
 }
 
@@ -76,7 +76,7 @@ void AsyncAudioDecoder::runLoop()
 
     {
         // Wait for until we have m_threadID established before starting the run loop.
 
     {
         // Wait for until we have m_threadID established before starting the run loop.
-        DeprecatedMutexLocker lock(m_threadCreationMutex);
+        MutexLocker lock(m_threadCreationMutex);
     }
 
     // Keep running decoding tasks until we're killed.
     }
 
     // Keep running decoding tasks until we're killed.
index ee2214c..5e40cd2 100644 (file)
@@ -81,7 +81,7 @@ private:
     void runLoop();
 
     WTF::ThreadIdentifier m_threadID;
     void runLoop();
 
     WTF::ThreadIdentifier m_threadID;
-    DeprecatedMutex m_threadCreationMutex;
+    Mutex m_threadCreationMutex;
     MessageQueue<DecodingTask> m_queue;
 };
 
     MessageQueue<DecodingTask> m_queue;
 };
 
index 64cba2c..f7d56e9 100644 (file)
@@ -380,7 +380,7 @@ private:
     unsigned m_connectionCount { 0 };
 
     // Graph locking.
     unsigned m_connectionCount { 0 };
 
     // Graph locking.
-    DeprecatedMutex m_contextGraphMutex;
+    Mutex m_contextGraphMutex;
     volatile ThreadIdentifier m_audioThread { 0 };
     volatile ThreadIdentifier m_graphOwnerThread; // if the lock is held then this is the thread which owns it, otherwise == UndefinedThreadIdentifier
 
     volatile ThreadIdentifier m_audioThread { 0 };
     volatile ThreadIdentifier m_graphOwnerThread; // if the lock is held then this is the thread which owns it, otherwise == UndefinedThreadIdentifier
 
index a3ecd90..b6e26e7 100644 (file)
@@ -63,13 +63,13 @@ const RealtimeMediaSourceStates& MediaStreamAudioSource::states()
 
 void MediaStreamAudioSource::addAudioConsumer(PassRefPtr<AudioDestinationConsumer> consumer)
 {
 
 void MediaStreamAudioSource::addAudioConsumer(PassRefPtr<AudioDestinationConsumer> consumer)
 {
-    DeprecatedMutexLocker locker(m_audioConsumersLock);
+    MutexLocker locker(m_audioConsumersLock);
     m_audioConsumers.append(consumer);
 }
 
 bool MediaStreamAudioSource::removeAudioConsumer(AudioDestinationConsumer* consumer)
 {
     m_audioConsumers.append(consumer);
 }
 
 bool MediaStreamAudioSource::removeAudioConsumer(AudioDestinationConsumer* consumer)
 {
-    DeprecatedMutexLocker locker(m_audioConsumersLock);
+    MutexLocker locker(m_audioConsumersLock);
     size_t pos = m_audioConsumers.find(consumer);
     if (pos != notFound) {
         m_audioConsumers.remove(pos);
     size_t pos = m_audioConsumers.find(consumer);
     if (pos != notFound) {
         m_audioConsumers.remove(pos);
@@ -80,14 +80,14 @@ bool MediaStreamAudioSource::removeAudioConsumer(AudioDestinationConsumer* consu
 
 void MediaStreamAudioSource::setAudioFormat(size_t numberOfChannels, float sampleRate)
 {
 
 void MediaStreamAudioSource::setAudioFormat(size_t numberOfChannels, float sampleRate)
 {
-    DeprecatedMutexLocker locker(m_audioConsumersLock);
+    MutexLocker locker(m_audioConsumersLock);
     for (auto& consumer : m_audioConsumers)
         consumer->setFormat(numberOfChannels, sampleRate);
 }
 
 void MediaStreamAudioSource::consumeAudio(AudioBus* bus, size_t numberOfFrames)
 {
     for (auto& consumer : m_audioConsumers)
         consumer->setFormat(numberOfChannels, sampleRate);
 }
 
 void MediaStreamAudioSource::consumeAudio(AudioBus* bus, size_t numberOfFrames)
 {
-    DeprecatedMutexLocker locker(m_audioConsumersLock);
+    MutexLocker locker(m_audioConsumersLock);
     for (auto& consumer : m_audioConsumers)
         consumer->consumeAudio(bus, numberOfFrames);
 }
     for (auto& consumer : m_audioConsumers)
         consumer->consumeAudio(bus, numberOfFrames);
 }
index d611c8e..418b32e 100644 (file)
@@ -65,7 +65,7 @@ private:
     MediaStreamAudioSource();
 
     String m_deviceId;
     MediaStreamAudioSource();
 
     String m_deviceId;
-    DeprecatedMutex m_audioConsumersLock;
+    Mutex m_audioConsumersLock;
     Vector<RefPtr<AudioDestinationConsumer>> m_audioConsumers;
     RealtimeMediaSourceStates m_currentStates;
 };
     Vector<RefPtr<AudioDestinationConsumer>> m_audioConsumers;
     RealtimeMediaSourceStates m_currentStates;
 };
index 60f543f..56d6c9e 100644 (file)
@@ -250,7 +250,7 @@ void Database::close()
     ASSERT(currentThread() == databaseContext()->databaseThread()->getThreadID());
 
     {
     ASSERT(currentThread() == databaseContext()->databaseThread()->getThreadID());
 
     {
-        DeprecatedMutexLocker locker(m_transactionInProgressMutex);
+        MutexLocker locker(m_transactionInProgressMutex);
 
         // Clean up transactions that have not been scheduled yet:
         // Transaction phase 1 cleanup. See comment on "What happens if a
 
         // Clean up transactions that have not been scheduled yet:
         // Transaction phase 1 cleanup. See comment on "What happens if a
@@ -507,7 +507,7 @@ void Database::scheduleTransaction()
 
 PassRefPtr<SQLTransactionBackend> Database::runTransaction(PassRefPtr<SQLTransaction> transaction, bool readOnly, const ChangeVersionData* data)
 {
 
 PassRefPtr<SQLTransactionBackend> Database::runTransaction(PassRefPtr<SQLTransaction> transaction, bool readOnly, const ChangeVersionData* data)
 {
-    DeprecatedMutexLocker locker(m_transactionInProgressMutex);
+    MutexLocker locker(m_transactionInProgressMutex);
     if (!m_isTransactionQueueEnabled)
         return 0;
 
     if (!m_isTransactionQueueEnabled)
         return 0;
 
@@ -535,14 +535,14 @@ void Database::scheduleTransactionStep(SQLTransactionBackend* transaction)
 
 void Database::inProgressTransactionCompleted()
 {
 
 void Database::inProgressTransactionCompleted()
 {
-    DeprecatedMutexLocker locker(m_transactionInProgressMutex);
+    MutexLocker locker(m_transactionInProgressMutex);
     m_transactionInProgress = false;
     scheduleTransaction();
 }
 
 bool Database::hasPendingTransaction()
 {
     m_transactionInProgress = false;
     scheduleTransaction();
 }
 
 bool Database::hasPendingTransaction()
 {
-    DeprecatedMutexLocker locker(m_transactionInProgressMutex);
+    MutexLocker locker(m_transactionInProgressMutex);
     return m_transactionInProgress || !m_transactionQueue.isEmpty();
 }
 
     return m_transactionInProgress || !m_transactionQueue.isEmpty();
 }
 
index 317e0ed..e61c20c 100644 (file)
@@ -58,7 +58,7 @@ public:
 
 private:
     bool m_taskCompleted;
 
 private:
     bool m_taskCompleted;
-    DeprecatedMutex m_synchronousMutex;
+    Mutex m_synchronousMutex;
     ThreadCondition m_synchronousCondition;
 #ifndef NDEBUG
     bool m_hasCheckedForTermination;
     ThreadCondition m_synchronousCondition;
 #ifndef NDEBUG
     bool m_hasCheckedForTermination;
index 7029825..2d76ef5 100644 (file)
@@ -61,7 +61,7 @@ DatabaseThread::~DatabaseThread()
 
 bool DatabaseThread::start()
 {
 
 bool DatabaseThread::start()
 {
-    DeprecatedMutexLocker lock(m_threadCreationMutex);
+    MutexLocker lock(m_threadCreationMutex);
 
     if (m_threadID)
         return true;
 
     if (m_threadID)
         return true;
@@ -100,7 +100,7 @@ void DatabaseThread::databaseThread()
 {
     {
         // Wait for DatabaseThread::start() to complete.
 {
     {
         // Wait for DatabaseThread::start() to complete.
-        DeprecatedMutexLocker lock(m_threadCreationMutex);
+        MutexLocker lock(m_threadCreationMutex);
         LOG(StorageAPI, "Started DatabaseThread %p", this);
     }
 
         LOG(StorageAPI, "Started DatabaseThread %p", this);
     }
 
index 8fdab79..dedb5e0 100644 (file)
@@ -72,7 +72,7 @@ private:
     static void databaseThreadStart(void*);
     void databaseThread();
 
     static void databaseThreadStart(void*);
     void databaseThread();
 
-    DeprecatedMutex m_threadCreationMutex;
+    Mutex m_threadCreationMutex;
     ThreadIdentifier m_threadID;
     RefPtr<DatabaseThread> m_selfRef;
 
     ThreadIdentifier m_threadID;
     RefPtr<DatabaseThread> m_selfRef;
 
index f6b6c67..aaa6b03 100644 (file)
@@ -89,7 +89,7 @@ DatabaseTracker::DatabaseTracker(const String& databasePath)
 
 void DatabaseTracker::setDatabaseDirectoryPath(const String& path)
 {
 
 void DatabaseTracker::setDatabaseDirectoryPath(const String& path)
 {
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
     ASSERT(!m_database.isOpen());
     m_databaseDirectoryPath = path.isolatedCopy();
 }
     ASSERT(!m_database.isOpen());
     m_databaseDirectoryPath = path.isolatedCopy();
 }
@@ -166,7 +166,7 @@ bool DatabaseTracker::canEstablishDatabase(DatabaseContext* context, const Strin
 {
     error = DatabaseError::None;
 
 {
     error = DatabaseError::None;
 
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
     SecurityOrigin* origin = context->securityOrigin();
 
     if (isDeletingDatabaseOrOriginFor(origin, name)) {
     SecurityOrigin* origin = context->securityOrigin();
 
     if (isDeletingDatabaseOrOriginFor(origin, name)) {
@@ -218,7 +218,7 @@ bool DatabaseTracker::retryCanEstablishDatabase(DatabaseContext* context, const
 {
     error = DatabaseError::None;
 
 {
     error = DatabaseError::None;
 
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
     SecurityOrigin* origin = context->securityOrigin();
 
     // We have already eliminated other types of errors in canEstablishDatabase().
     SecurityOrigin* origin = context->securityOrigin();
 
     // We have already eliminated other types of errors in canEstablishDatabase().
@@ -257,7 +257,7 @@ bool DatabaseTracker::hasEntryForOriginNoLock(SecurityOrigin* origin)
 
 bool DatabaseTracker::hasEntryForOrigin(SecurityOrigin* origin)
 {
 
 bool DatabaseTracker::hasEntryForOrigin(SecurityOrigin* origin)
 {
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
     return hasEntryForOriginNoLock(origin);
 }
 
     return hasEntryForOriginNoLock(origin);
 }
 
@@ -286,7 +286,7 @@ unsigned long long DatabaseTracker::getMaxSizeForDatabase(const Database* databa
 {
     // The maximum size for a database is the full quota for its origin, minus the current usage within the origin,
     // plus the current usage of the given database
 {
     // The maximum size for a database is the full quota for its origin, minus the current usage within the origin,
     // plus the current usage of the given database
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
     SecurityOrigin* origin = database->securityOrigin();
 
     unsigned long long quota = quotaForOriginNoLock(origin);
     SecurityOrigin* origin = database->securityOrigin();
 
     unsigned long long quota = quotaForOriginNoLock(origin);
@@ -311,7 +311,7 @@ void DatabaseTracker::closeAllDatabases()
 {
     Vector<Ref<Database>> openDatabases;
     {
 {
     Vector<Ref<Database>> openDatabases;
     {
-        DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
+        MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
         if (!m_openDatabaseMap)
             return;
         for (auto& nameMap : m_openDatabaseMap->values()) {
         if (!m_openDatabaseMap)
             return;
         for (auto& nameMap : m_openDatabaseMap->values()) {
@@ -389,13 +389,13 @@ String DatabaseTracker::fullPathForDatabaseNoLock(SecurityOrigin* origin, const
 
 String DatabaseTracker::fullPathForDatabase(SecurityOrigin* origin, const String& name, bool createIfNotExists)
 {
 
 String DatabaseTracker::fullPathForDatabase(SecurityOrigin* origin, const String& name, bool createIfNotExists)
 {
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
     return fullPathForDatabaseNoLock(origin, name, createIfNotExists).isolatedCopy();
 }
 
 void DatabaseTracker::origins(Vector<RefPtr<SecurityOrigin>>& originsResult)
 {
     return fullPathForDatabaseNoLock(origin, name, createIfNotExists).isolatedCopy();
 }
 
 void DatabaseTracker::origins(Vector<RefPtr<SecurityOrigin>>& originsResult)
 {
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
 
     openTrackerDatabase(DontCreateIfDoesNotExist);
     if (!m_database.isOpen())
 
     openTrackerDatabase(DontCreateIfDoesNotExist);
     if (!m_database.isOpen())
@@ -448,7 +448,7 @@ bool DatabaseTracker::databaseNamesForOrigin(SecurityOrigin* origin, Vector<Stri
 {
     Vector<String> temp;
     {
 {
     Vector<String> temp;
     {
-        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+        MutexLocker lockDatabase(m_databaseGuard);
         if (!databaseNamesForOriginNoLock(origin, temp))
           return false;
     }
         if (!databaseNamesForOriginNoLock(origin, temp))
           return false;
     }
@@ -465,7 +465,7 @@ DatabaseDetails DatabaseTracker::detailsForNameAndOrigin(const String& name, Sec
     int64_t expectedUsage;
 
     {
     int64_t expectedUsage;
 
     {
-        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+        MutexLocker lockDatabase(m_databaseGuard);
 
         openTrackerDatabase(DontCreateIfDoesNotExist);
         if (!m_database.isOpen())
 
         openTrackerDatabase(DontCreateIfDoesNotExist);
         if (!m_database.isOpen())
@@ -500,7 +500,7 @@ void DatabaseTracker::setDatabaseDetails(SecurityOrigin* origin, const String& n
     String originIdentifier = origin->databaseIdentifier();
     int64_t guid = 0;
 
     String originIdentifier = origin->databaseIdentifier();
     int64_t guid = 0;
 
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
 
     openTrackerDatabase(CreateIfDoesNotExist);
     if (!m_database.isOpen())
 
     openTrackerDatabase(CreateIfDoesNotExist);
     if (!m_database.isOpen())
@@ -549,7 +549,7 @@ void DatabaseTracker::setDatabaseDetails(SecurityOrigin* origin, const String& n
 
 void DatabaseTracker::doneCreatingDatabase(Database* database)
 {
 
 void DatabaseTracker::doneCreatingDatabase(Database* database)
 {
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
     doneCreatingDatabase(database->securityOrigin(), database->stringIdentifier());
 }
 
     doneCreatingDatabase(database->securityOrigin(), database->stringIdentifier());
 }
 
@@ -559,7 +559,7 @@ void DatabaseTracker::addOpenDatabase(Database* database)
         return;
 
     {
         return;
 
     {
-        DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
+        MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
 
         if (!m_openDatabaseMap)
             m_openDatabaseMap = std::make_unique<DatabaseOriginMap>();
 
         if (!m_openDatabaseMap)
             m_openDatabaseMap = std::make_unique<DatabaseOriginMap>();
@@ -589,7 +589,7 @@ void DatabaseTracker::removeOpenDatabase(Database* database)
         return;
 
     {
         return;
 
     {
-        DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
+        MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
 
         if (!m_openDatabaseMap) {
             ASSERT_NOT_REACHED();
 
         if (!m_openDatabaseMap) {
             ASSERT_NOT_REACHED();
@@ -629,7 +629,7 @@ void DatabaseTracker::removeOpenDatabase(Database* database)
 
 void DatabaseTracker::getOpenDatabases(SecurityOrigin* origin, const String& name, HashSet<RefPtr<Database>>* databases)
 {
 
 void DatabaseTracker::getOpenDatabases(SecurityOrigin* origin, const String& name, HashSet<RefPtr<Database>>* databases)
 {
-    DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
+    MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
     if (!m_openDatabaseMap)
         return;
 
     if (!m_openDatabaseMap)
         return;
 
@@ -647,7 +647,7 @@ void DatabaseTracker::getOpenDatabases(SecurityOrigin* origin, const String& nam
 
 RefPtr<OriginLock> DatabaseTracker::originLockFor(SecurityOrigin* origin)
 {
 
 RefPtr<OriginLock> DatabaseTracker::originLockFor(SecurityOrigin* origin)
 {
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
     String databaseIdentifier = origin->databaseIdentifier();
 
     // The originLockMap is accessed from multiple DatabaseThreads since
     String databaseIdentifier = origin->databaseIdentifier();
 
     // The originLockMap is accessed from multiple DatabaseThreads since
@@ -727,13 +727,13 @@ unsigned long long DatabaseTracker::quotaForOriginNoLock(SecurityOrigin* origin)
 
 unsigned long long DatabaseTracker::quotaForOrigin(SecurityOrigin* origin)
 {
 
 unsigned long long DatabaseTracker::quotaForOrigin(SecurityOrigin* origin)
 {
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
     return quotaForOriginNoLock(origin);
 }
 
 void DatabaseTracker::setQuota(SecurityOrigin* origin, unsigned long long quota)
 {
     return quotaForOriginNoLock(origin);
 }
 
 void DatabaseTracker::setQuota(SecurityOrigin* origin, unsigned long long quota)
 {
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
 
     if (quotaForOriginNoLock(origin) == quota)
         return;
 
     if (quotaForOriginNoLock(origin) == quota)
         return;
@@ -864,7 +864,7 @@ bool DatabaseTracker::deleteOrigin(SecurityOrigin* origin)
 {
     Vector<String> databaseNames;
     {
 {
     Vector<String> databaseNames;
     {
-        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+        MutexLocker lockDatabase(m_databaseGuard);
         openTrackerDatabase(DontCreateIfDoesNotExist);
         if (!m_database.isOpen())
             return false;
         openTrackerDatabase(DontCreateIfDoesNotExist);
         if (!m_database.isOpen())
             return false;
@@ -890,7 +890,7 @@ bool DatabaseTracker::deleteOrigin(SecurityOrigin* origin)
     }
 
     {
     }
 
     {
-        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+        MutexLocker lockDatabase(m_databaseGuard);
         deleteOriginLockFor(origin);
         doneDeletingOrigin(origin);
 
         deleteOriginLockFor(origin);
         doneDeletingOrigin(origin);
 
@@ -1071,7 +1071,7 @@ void DatabaseTracker::doneDeletingOrigin(SecurityOrigin *origin)
 bool DatabaseTracker::deleteDatabase(SecurityOrigin* origin, const String& name)
 {
     {
 bool DatabaseTracker::deleteDatabase(SecurityOrigin* origin, const String& name)
 {
     {
-        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+        MutexLocker lockDatabase(m_databaseGuard);
         openTrackerDatabase(DontCreateIfDoesNotExist);
         if (!m_database.isOpen())
             return false;
         openTrackerDatabase(DontCreateIfDoesNotExist);
         if (!m_database.isOpen())
             return false;
@@ -1086,12 +1086,12 @@ bool DatabaseTracker::deleteDatabase(SecurityOrigin* origin, const String& name)
     // We drop the lock here because holding locks during a call to deleteDatabaseFile will deadlock.
     if (!deleteDatabaseFile(origin, name)) {
         LOG_ERROR("Unable to delete file for database %s in origin %s", name.ascii().data(), origin->databaseIdentifier().ascii().data());
     // We drop the lock here because holding locks during a call to deleteDatabaseFile will deadlock.
     if (!deleteDatabaseFile(origin, name)) {
         LOG_ERROR("Unable to delete file for database %s in origin %s", name.ascii().data(), origin->databaseIdentifier().ascii().data());
-        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+        MutexLocker lockDatabase(m_databaseGuard);
         doneDeletingDatabase(origin, name);
         return false;
     }
 
         doneDeletingDatabase(origin, name);
         return false;
     }
 
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
 
     SQLiteStatement statement(m_database, "DELETE FROM Databases WHERE origin=? AND name=?");
     if (statement.prepare() != SQLITE_OK) {
 
     SQLiteStatement statement(m_database, "DELETE FROM Databases WHERE origin=? AND name=?");
     if (statement.prepare() != SQLITE_OK) {
@@ -1131,7 +1131,7 @@ bool DatabaseTracker::deleteDatabaseFile(SecurityOrigin* origin, const String& n
 
 #ifndef NDEBUG
     {
 
 #ifndef NDEBUG
     {
-        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+        MutexLocker lockDatabase(m_databaseGuard);
         ASSERT(isDeletingDatabaseOrOriginFor(origin, name));
     }
 #endif
         ASSERT(isDeletingDatabaseOrOriginFor(origin, name));
     }
 #endif
@@ -1142,7 +1142,7 @@ bool DatabaseTracker::deleteDatabaseFile(SecurityOrigin* origin, const String& n
     // Database::markAsDeletedAndClose(), since that can cause a deadlock
     // during the synchronous DatabaseThread call it triggers.
     {
     // Database::markAsDeletedAndClose(), since that can cause a deadlock
     // during the synchronous DatabaseThread call it triggers.
     {
-        DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
+        MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
         if (m_openDatabaseMap) {
             // There are some open databases, lets check if they are for this origin.
             DatabaseNameMap* nameMap = m_openDatabaseMap->get(origin);
         if (m_openDatabaseMap) {
             // There are some open databases, lets check if they are for this origin.
             DatabaseNameMap* nameMap = m_openDatabaseMap->get(origin);
@@ -1185,7 +1185,7 @@ void DatabaseTracker::removeDeletedOpenedDatabases()
     
     {
         // Acquire the lock before calling openTrackerDatabase.
     
     {
         // Acquire the lock before calling openTrackerDatabase.
-        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+        MutexLocker lockDatabase(m_databaseGuard);
         openTrackerDatabase(DontCreateIfDoesNotExist);
     }
 
         openTrackerDatabase(DontCreateIfDoesNotExist);
     }
 
@@ -1201,7 +1201,7 @@ void DatabaseTracker::removeDeletedOpenedDatabases()
     // Database::markAsDeletedAndClose(), since that can cause a deadlock
     // during the synchronous DatabaseThread call it triggers.
     {
     // Database::markAsDeletedAndClose(), since that can cause a deadlock
     // during the synchronous DatabaseThread call it triggers.
     {
-        DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
+        MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
         if (m_openDatabaseMap) {
             for (auto& openDatabase : *m_openDatabaseMap) {
                 auto& origin = openDatabase.key;
         if (m_openDatabaseMap) {
             for (auto& openDatabase : *m_openDatabaseMap) {
                 auto& origin = openDatabase.key;
@@ -1305,9 +1305,9 @@ bool DatabaseTracker::deleteDatabaseFileIfEmpty(const String& path)
     return SQLiteFileSystem::deleteDatabaseFile(path);
 }
 
     return SQLiteFileSystem::deleteDatabaseFile(path);
 }
 
-DeprecatedMutex& DatabaseTracker::openDatabaseMutex()
+Mutex& DatabaseTracker::openDatabaseMutex()
 {
 {
-    static NeverDestroyed<DeprecatedMutex> mutex;
+    static NeverDestroyed<Mutex> mutex;
     return mutex;
 }
 
     return mutex;
 }
 
@@ -1330,9 +1330,9 @@ void DatabaseTracker::setClient(DatabaseManagerClient* client)
     m_client = client;
 }
 
     m_client = client;
 }
 
-static DeprecatedMutex& notificationMutex()
+static Mutex& notificationMutex()
 {
 {
-    static NeverDestroyed<DeprecatedMutex> mutex;
+    static NeverDestroyed<Mutex> mutex;
     return mutex;
 }
 
     return mutex;
 }
 
@@ -1346,7 +1346,7 @@ static NotificationQueue& notificationQueue()
 
 void DatabaseTracker::scheduleNotifyDatabaseChanged(SecurityOrigin* origin, const String& name)
 {
 
 void DatabaseTracker::scheduleNotifyDatabaseChanged(SecurityOrigin* origin, const String& name)
 {
-    DeprecatedMutexLocker locker(notificationMutex());
+    MutexLocker locker(notificationMutex());
 
     notificationQueue().append(std::pair<RefPtr<SecurityOrigin>, String>(origin->isolatedCopy(), name.isolatedCopy()));
     scheduleForNotification();
 
     notificationQueue().append(std::pair<RefPtr<SecurityOrigin>, String>(origin->isolatedCopy(), name.isolatedCopy()));
     scheduleForNotification();
@@ -1372,7 +1372,7 @@ void DatabaseTracker::notifyDatabasesChanged(void*)
 
     NotificationQueue notifications;
     {
 
     NotificationQueue notifications;
     {
-        DeprecatedMutexLocker locker(notificationMutex());
+        MutexLocker locker(notificationMutex());
 
         notifications.swap(notificationQueue());
 
 
         notifications.swap(notificationQueue());
 
index 54e68ff..74067b9 100644 (file)
@@ -107,7 +107,7 @@ public:
     // MobileSafari will grab this mutex on the main thread before dispatching the task to 
     // clean up zero byte database files.  Any operations to open new database will have to
     // wait for that task to finish by waiting on this mutex.
     // MobileSafari will grab this mutex on the main thread before dispatching the task to 
     // clean up zero byte database files.  Any operations to open new database will have to
     // wait for that task to finish by waiting on this mutex.
-    static DeprecatedMutex& openDatabaseMutex();
+    static Mutex& openDatabaseMutex();
     
     WEBCORE_EXPORT static void emptyDatabaseFilesRemovalTaskWillBeScheduled();
     WEBCORE_EXPORT static void emptyDatabaseFilesRemovalTaskDidFinish();
     
     WEBCORE_EXPORT static void emptyDatabaseFilesRemovalTaskWillBeScheduled();
     WEBCORE_EXPORT static void emptyDatabaseFilesRemovalTaskDidFinish();
@@ -150,11 +150,11 @@ private:
     typedef HashMap<String, DatabaseSet*> DatabaseNameMap;
     typedef HashMap<RefPtr<SecurityOrigin>, DatabaseNameMap*> DatabaseOriginMap;
 
     typedef HashMap<String, DatabaseSet*> DatabaseNameMap;
     typedef HashMap<RefPtr<SecurityOrigin>, DatabaseNameMap*> DatabaseOriginMap;
 
-    DeprecatedMutex m_openDatabaseMapGuard;
+    Mutex m_openDatabaseMapGuard;
     mutable std::unique_ptr<DatabaseOriginMap> m_openDatabaseMap;
 
     // This lock protects m_database, m_originLockMap, m_databaseDirectoryPath, m_originsBeingDeleted, m_beingCreated, and m_beingDeleted.
     mutable std::unique_ptr<DatabaseOriginMap> m_openDatabaseMap;
 
     // This lock protects m_database, m_originLockMap, m_databaseDirectoryPath, m_originsBeingDeleted, m_beingCreated, and m_beingDeleted.
-    DeprecatedMutex m_databaseGuard;
+    Mutex m_databaseGuard;
     SQLiteDatabase m_database;
 
     typedef HashMap<String, RefPtr<OriginLock>> OriginLockMap;
     SQLiteDatabase m_database;
 
     typedef HashMap<String, RefPtr<OriginLock>> OriginLockMap;
index 6fbcece..45c1557 100644 (file)
@@ -48,7 +48,7 @@ private:
     static String lockFileNameForPath(String originPath);
 
     String m_lockFileName;
     static String lockFileNameForPath(String originPath);
 
     String m_lockFileName;
-    DeprecatedMutex m_mutex;
+    Mutex m_mutex;
 #if USE(FILE_LOCK)
     PlatformFileHandle m_lockHandle;
 #endif
 #if USE(FILE_LOCK)
     PlatformFileHandle m_lockHandle;
 #endif
index 995aaaf..ca22801 100644 (file)
@@ -58,7 +58,7 @@ public:
         ScriptExecutionContext* scriptExecutionContextPtr;
         T* callback;
         {
         ScriptExecutionContext* scriptExecutionContextPtr;
         T* callback;
         {
-            DeprecatedMutexLocker locker(m_mutex);
+            MutexLocker locker(m_mutex);
             if (!m_callback) {
                 ASSERT(!m_scriptExecutionContext);
                 return;
             if (!m_callback) {
                 ASSERT(!m_scriptExecutionContext);
                 return;
@@ -83,7 +83,7 @@ public:
 
     PassRefPtr<T> unwrap()
     {
 
     PassRefPtr<T> unwrap()
     {
-        DeprecatedMutexLocker locker(m_mutex);
+        MutexLocker locker(m_mutex);
         ASSERT(!m_callback || m_scriptExecutionContext->isContextThread());
         m_scriptExecutionContext = nullptr;
         return m_callback.release();
         ASSERT(!m_callback || m_scriptExecutionContext->isContextThread());
         m_scriptExecutionContext = nullptr;
         return m_callback.release();
@@ -93,7 +93,7 @@ public:
     bool hasCallback() const { return m_callback; }
 
 private:
     bool hasCallback() const { return m_callback; }
 
 private:
-    DeprecatedMutex m_mutex;
+    Mutex m_mutex;
     RefPtr<T> m_callback;
     RefPtr<ScriptExecutionContext> m_scriptExecutionContext;
 };
     RefPtr<T> m_callback;
     RefPtr<ScriptExecutionContext> m_scriptExecutionContext;
 };
index 4ba4450..3fb6ad2 100644 (file)
@@ -381,7 +381,7 @@ void SQLTransactionBackend::doCleanup()
 
     releaseOriginLockIfNeeded();
 
 
     releaseOriginLockIfNeeded();
 
-    DeprecatedMutexLocker locker(m_statementMutex);
+    MutexLocker locker(m_statementMutex);
     m_statementQueue.clear();
 
     if (m_sqliteTransaction) {
     m_statementQueue.clear();
 
     if (m_sqliteTransaction) {
@@ -465,7 +465,7 @@ SQLTransactionBackend::StateFunction SQLTransactionBackend::stateFunctionFor(SQL
 
 void SQLTransactionBackend::enqueueStatementBackend(PassRefPtr<SQLStatementBackend> statementBackend)
 {
 
 void SQLTransactionBackend::enqueueStatementBackend(PassRefPtr<SQLStatementBackend> statementBackend)
 {
-    DeprecatedMutexLocker locker(m_statementMutex);
+    MutexLocker locker(m_statementMutex);
     m_statementQueue.append(statementBackend);
 }
 
     m_statementQueue.append(statementBackend);
 }
 
@@ -665,7 +665,7 @@ void SQLTransactionBackend::getNextStatement()
 {
     m_currentStatementBackend = nullptr;
 
 {
     m_currentStatementBackend = nullptr;
 
-    DeprecatedMutexLocker locker(m_statementMutex);
+    MutexLocker locker(m_statementMutex);
     if (!m_statementQueue.isEmpty())
         m_currentStatementBackend = m_statementQueue.takeFirst();
 }
     if (!m_statementQueue.isEmpty())
         m_currentStatementBackend = m_statementQueue.takeFirst();
 }
index 302a068..a93206d 100644 (file)
@@ -128,7 +128,7 @@ private:
     bool m_readOnly;
     bool m_hasVersionMismatch;
 
     bool m_readOnly;
     bool m_hasVersionMismatch;
 
-    DeprecatedMutex m_statementMutex;
+    Mutex m_statementMutex;
     Deque<RefPtr<SQLStatementBackend>> m_statementQueue;
 
     std::unique_ptr<SQLiteTransaction> m_sqliteTransaction;
     Deque<RefPtr<SQLStatementBackend>> m_statementQueue;
 
     std::unique_ptr<SQLiteTransaction> m_sqliteTransaction;
index 5613b3d..28c9ef0 100644 (file)
@@ -150,7 +150,7 @@ void WorkerScriptController::scheduleExecutionTermination()
     // The mutex provides a memory barrier to ensure that once
     // termination is scheduled, isExecutionTerminating will
     // accurately reflect that state when called from another thread.
     // The mutex provides a memory barrier to ensure that once
     // termination is scheduled, isExecutionTerminating will
     // accurately reflect that state when called from another thread.
-    DeprecatedMutexLocker locker(m_scheduledTerminationMutex);
+    MutexLocker locker(m_scheduledTerminationMutex);
     if (m_vm->watchdog)
         m_vm->watchdog->fire();
 }
     if (m_vm->watchdog)
         m_vm->watchdog->fire();
 }
@@ -158,7 +158,7 @@ void WorkerScriptController::scheduleExecutionTermination()
 bool WorkerScriptController::isExecutionTerminating() const
 {
     // See comments in scheduleExecutionTermination regarding mutex usage.
 bool WorkerScriptController::isExecutionTerminating() const
 {
     // See comments in scheduleExecutionTermination regarding mutex usage.
-    DeprecatedMutexLocker locker(m_scheduledTerminationMutex);
+    MutexLocker locker(m_scheduledTerminationMutex);
     if (m_vm->watchdog)
         return m_vm->watchdog->didFire();
     return false;
     if (m_vm->watchdog)
         return m_vm->watchdog->didFire();
     return false;
index 8ae4b4e..d57aad6 100644 (file)
@@ -97,7 +97,7 @@ namespace WebCore {
         WorkerGlobalScope* m_workerGlobalScope;
         JSC::Strong<JSWorkerGlobalScope> m_workerGlobalScopeWrapper;
         bool m_executionForbidden;
         WorkerGlobalScope* m_workerGlobalScope;
         JSC::Strong<JSWorkerGlobalScope> m_workerGlobalScopeWrapper;
         bool m_executionForbidden;
-        mutable DeprecatedMutex m_scheduledTerminationMutex;
+        mutable Mutex m_scheduledTerminationMutex;
     };
 
 } // namespace WebCore
     };
 
 } // namespace WebCore
index dfa5320..c417486 100644 (file)
@@ -88,7 +88,7 @@ void MessagePortChannel::disentangle()
 
 void MessagePortChannel::postMessageToRemote(PassRefPtr<SerializedScriptValue> message, std::unique_ptr<MessagePortChannelArray> channels)
 {
 
 void MessagePortChannel::postMessageToRemote(PassRefPtr<SerializedScriptValue> message, std::unique_ptr<MessagePortChannelArray> channels)
 {
-    DeprecatedMutexLocker lock(m_channel->m_mutex);
+    MutexLocker lock(m_channel->m_mutex);
     if (!m_channel->m_outgoingQueue)
         return;
     bool wasEmpty = m_channel->m_outgoingQueue->appendAndCheckEmpty(std::make_unique<PlatformMessagePortChannel::EventData>(message, WTF::move(channels)));
     if (!m_channel->m_outgoingQueue)
         return;
     bool wasEmpty = m_channel->m_outgoingQueue->appendAndCheckEmpty(std::make_unique<PlatformMessagePortChannel::EventData>(message, WTF::move(channels)));
@@ -98,7 +98,7 @@ void MessagePortChannel::postMessageToRemote(PassRefPtr<SerializedScriptValue> m
 
 bool MessagePortChannel::tryGetMessageFromRemote(RefPtr<SerializedScriptValue>& message, std::unique_ptr<MessagePortChannelArray>& channels)
 {
 
 bool MessagePortChannel::tryGetMessageFromRemote(RefPtr<SerializedScriptValue>& message, std::unique_ptr<MessagePortChannelArray>& channels)
 {
-    DeprecatedMutexLocker lock(m_channel->m_mutex);
+    MutexLocker lock(m_channel->m_mutex);
     auto result = m_channel->m_incomingQueue->tryGetMessage();
     if (!result)
         return false;
     auto result = m_channel->m_incomingQueue->tryGetMessage();
     if (!result)
         return false;
@@ -121,20 +121,20 @@ void MessagePortChannel::close()
 bool MessagePortChannel::isConnectedTo(MessagePort* port)
 {
     // FIXME: What guarantees that the result remains the same after we release the lock?
 bool MessagePortChannel::isConnectedTo(MessagePort* port)
 {
     // FIXME: What guarantees that the result remains the same after we release the lock?
-    DeprecatedMutexLocker lock(m_channel->m_mutex);
+    MutexLocker lock(m_channel->m_mutex);
     return m_channel->m_remotePort == port;
 }
 
 bool MessagePortChannel::hasPendingActivity()
 {
     // FIXME: What guarantees that the result remains the same after we release the lock?
     return m_channel->m_remotePort == port;
 }
 
 bool MessagePortChannel::hasPendingActivity()
 {
     // FIXME: What guarantees that the result remains the same after we release the lock?
-    DeprecatedMutexLocker lock(m_channel->m_mutex);
+    MutexLocker lock(m_channel->m_mutex);
     return !m_channel->m_incomingQueue->isEmpty();
 }
 
 MessagePort* MessagePortChannel::locallyEntangledPort(const ScriptExecutionContext* context)
 {
     return !m_channel->m_incomingQueue->isEmpty();
 }
 
 MessagePort* MessagePortChannel::locallyEntangledPort(const ScriptExecutionContext* context)
 {
-    DeprecatedMutexLocker lock(m_channel->m_mutex);
+    MutexLocker lock(m_channel->m_mutex);
     // See if both contexts are run by the same thread (are the same context, or are both documents).
     if (m_channel->m_remotePort) {
         // The remote port's ScriptExecutionContext is guaranteed not to change here - MessagePort::contextDestroyed()
     // See if both contexts are run by the same thread (are the same context, or are both documents).
     if (m_channel->m_remotePort) {
         // The remote port's ScriptExecutionContext is guaranteed not to change here - MessagePort::contextDestroyed()
@@ -164,7 +164,7 @@ PlatformMessagePortChannel::~PlatformMessagePortChannel()
 
 void PlatformMessagePortChannel::setRemotePort(MessagePort* port)
 {
 
 void PlatformMessagePortChannel::setRemotePort(MessagePort* port)
 {
-    DeprecatedMutexLocker lock(m_mutex);
+    MutexLocker lock(m_mutex);
     // Should never set port if it is already set.
     ASSERT(!port || !m_remotePort);
     m_remotePort = port;
     // Should never set port if it is already set.
     ASSERT(!port || !m_remotePort);
     m_remotePort = port;
@@ -175,13 +175,13 @@ PassRefPtr<PlatformMessagePortChannel> PlatformMessagePortChannel::entangledChan
     // FIXME: What guarantees that the result remains the same after we release the lock?
     // This lock only guarantees that the returned pointer will not be pointing to released memory,
     // but not that it will still be pointing to this object's entangled port channel.
     // FIXME: What guarantees that the result remains the same after we release the lock?
     // This lock only guarantees that the returned pointer will not be pointing to released memory,
     // but not that it will still be pointing to this object's entangled port channel.
-    DeprecatedMutexLocker lock(m_mutex);
+    MutexLocker lock(m_mutex);
     return m_entangledChannel;
 }
 
 void PlatformMessagePortChannel::closeInternal()
 {
     return m_entangledChannel;
 }
 
 void PlatformMessagePortChannel::closeInternal()
 {
-    DeprecatedMutexLocker lock(m_mutex);
+    MutexLocker lock(m_mutex);
     // Disentangle ourselves from the other end. We still maintain a reference to our incoming queue, since previously-existing messages should still be delivered.
     m_remotePort = nullptr;
     m_entangledChannel = nullptr;
     // Disentangle ourselves from the other end. We still maintain a reference to our incoming queue, since previously-existing messages should still be delivered.
     m_remotePort = nullptr;
     m_entangledChannel = nullptr;
index bffb15d..b703d12 100644 (file)
@@ -95,8 +95,8 @@ namespace WebCore {
         void setRemotePort(MessagePort*);
         void closeInternal();
 
         void setRemotePort(MessagePort*);
         void closeInternal();
 
-        // DeprecatedMutex used to ensure exclusive access to the object internals.
-        DeprecatedMutex m_mutex;
+        // Mutex used to ensure exclusive access to the object internals.
+        Mutex m_mutex;
 
         // Pointer to our entangled pair - cleared when close() is called.
         RefPtr<PlatformMessagePortChannel> m_entangledChannel;
 
         // Pointer to our entangled pair - cleared when close() is called.
         RefPtr<PlatformMessagePortChannel> m_entangledChannel;
index c0b9041..64a7555 100644 (file)
@@ -186,7 +186,7 @@ void IconDatabase::removeAllIcons()
     
     // Clear the in-memory record of every IconRecord, anything waiting to be read from disk, and anything waiting to be written to disk
     {
     
     // Clear the in-memory record of every IconRecord, anything waiting to be read from disk, and anything waiting to be written to disk
     {
-        DeprecatedMutexLocker locker(m_urlAndIconLock);
+        MutexLocker locker(m_urlAndIconLock);
         
         // Clear the IconRecords for every page URL - RefCounting will cause the IconRecords themselves to be deleted
         // We don't delete the actual PageRecords because we have the "retain icon for url" count to keep track of
         
         // Clear the IconRecords for every page URL - RefCounting will cause the IconRecords themselves to be deleted
         // We don't delete the actual PageRecords because we have the "retain icon for url" count to keep track of
@@ -200,14 +200,14 @@ void IconDatabase::removeAllIcons()
                     
         // Clear all in-memory records of things that need to be synced out to disk
         {
                     
         // Clear all in-memory records of things that need to be synced out to disk
         {
-            DeprecatedMutexLocker locker(m_pendingSyncLock);
+            MutexLocker locker(m_pendingSyncLock);
             m_pageURLsPendingSync.clear();
             m_iconsPendingSync.clear();
         }
         
         // Clear all in-memory records of things that need to be read in from disk
         {
             m_pageURLsPendingSync.clear();
             m_iconsPendingSync.clear();
         }
         
         // Clear all in-memory records of things that need to be read in from disk
         {
-            DeprecatedMutexLocker locker(m_pendingReadingLock);
+            MutexLocker locker(m_pendingReadingLock);
             m_pageURLsPendingImport.clear();
             m_pageURLsInterestedInIcons.clear();
             m_iconsPendingReading.clear();
             m_pageURLsPendingImport.clear();
             m_pageURLsInterestedInIcons.clear();
             m_iconsPendingReading.clear();
@@ -229,7 +229,7 @@ Image* IconDatabase::synchronousIconForPageURL(const String& pageURLOriginal, co
     if (!isOpen() || !documentCanHaveIcon(pageURLOriginal))
         return 0;
 
     if (!isOpen() || !documentCanHaveIcon(pageURLOriginal))
         return 0;
 
-    DeprecatedMutexLocker locker(m_urlAndIconLock);
+    MutexLocker locker(m_urlAndIconLock);
 
     performPendingRetainAndReleaseOperations();
     
 
     performPendingRetainAndReleaseOperations();
     
@@ -245,7 +245,7 @@ Image* IconDatabase::synchronousIconForPageURL(const String& pageURLOriginal, co
     // 1 - The initial url import is incomplete and this pageURL was marked to be notified once it is complete if an iconURL exists
     // 2 - The initial url import IS complete and this pageURL has no icon
     if (!pageRecord) {
     // 1 - The initial url import is incomplete and this pageURL was marked to be notified once it is complete if an iconURL exists
     // 2 - The initial url import IS complete and this pageURL has no icon
     if (!pageRecord) {
-        DeprecatedMutexLocker locker(m_pendingReadingLock);
+        MutexLocker locker(m_pendingReadingLock);
         
         // Import is ongoing, there might be an icon.  In this case, register to be notified when the icon comes in
         // If we ever reach this condition, we know we've already made the pageURL copy
         
         // Import is ongoing, there might be an icon.  In this case, register to be notified when the icon comes in
         // If we ever reach this condition, we know we've already made the pageURL copy
@@ -276,7 +276,7 @@ Image* IconDatabase::synchronousIconForPageURL(const String& pageURLOriginal, co
         if (pageURLCopy.isNull())
             pageURLCopy = pageURLOriginal.isolatedCopy();
     
         if (pageURLCopy.isNull())
             pageURLCopy = pageURLOriginal.isolatedCopy();
     
-        DeprecatedMutexLocker locker(m_pendingReadingLock);
+        MutexLocker locker(m_pendingReadingLock);
         m_pageURLsInterestedInIcons.add(pageURLCopy);
         m_iconsPendingReading.add(iconRecord);
         wakeSyncThread();
         m_pageURLsInterestedInIcons.add(pageURLCopy);
         m_iconsPendingReading.add(iconRecord);
         wakeSyncThread();
@@ -307,7 +307,7 @@ PassNativeImagePtr IconDatabase::synchronousNativeIconForPageURL(const String& p
     if (!icon)
         return 0;
 
     if (!icon)
         return 0;
 
-    DeprecatedMutexLocker locker(m_urlAndIconLock);
+    MutexLocker locker(m_urlAndIconLock);
     return icon->nativeImageForCurrentFrame();
 }
 
     return icon->nativeImageForCurrentFrame();
 }
 
@@ -329,7 +329,7 @@ String IconDatabase::synchronousIconURLForPageURL(const String& pageURLOriginal)
     if (!isOpen() || !documentCanHaveIcon(pageURLOriginal))
         return String();
         
     if (!isOpen() || !documentCanHaveIcon(pageURLOriginal))
         return String();
         
-    DeprecatedMutexLocker locker(m_urlAndIconLock);
+    MutexLocker locker(m_urlAndIconLock);
     
     PageURLRecord* pageRecord = m_pageURLToRecordMap.get(pageURLOriginal);
     if (!pageRecord)
     
     PageURLRecord* pageRecord = m_pageURLToRecordMap.get(pageURLOriginal);
     if (!pageRecord)
@@ -417,7 +417,7 @@ void IconDatabase::retainIconForPageURL(const String& pageURL)
         return;
 
     {
         return;
 
     {
-        DeprecatedMutexLocker locker(m_urlsToRetainOrReleaseLock);
+        MutexLocker locker(m_urlsToRetainOrReleaseLock);
         m_urlsToRetain.add(pageURL.isolatedCopy());
         m_retainOrReleaseIconRequested = true;
     }
         m_urlsToRetain.add(pageURL.isolatedCopy());
         m_retainOrReleaseIconRequested = true;
     }
@@ -450,7 +450,7 @@ void IconDatabase::performRetainIconForPageURL(const String& pageURLOriginal, in
         if (!m_iconURLImportComplete)
             return;
 
         if (!m_iconURLImportComplete)
             return;
 
-        DeprecatedMutexLocker locker(m_pendingSyncLock);
+        MutexLocker locker(m_pendingSyncLock);
         // If this pageURL waiting to be sync'ed, update the sync record
         // 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!
         if (!m_privateBrowsingEnabled && m_pageURLsPendingSync.contains(pageURL)) {
         // If this pageURL waiting to be sync'ed, update the sync record
         // 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!
         if (!m_privateBrowsingEnabled && m_pageURLsPendingSync.contains(pageURL)) {
@@ -470,7 +470,7 @@ void IconDatabase::releaseIconForPageURL(const String& pageURL)
         return;
 
     {
         return;
 
     {
-        DeprecatedMutexLocker locker(m_urlsToRetainOrReleaseLock);
+        MutexLocker locker(m_urlsToRetainOrReleaseLock);
         m_urlsToRelease.add(pageURL.isolatedCopy());
         m_retainOrReleaseIconRequested = true;
     }
         m_urlsToRelease.add(pageURL.isolatedCopy());
         m_retainOrReleaseIconRequested = true;
     }
@@ -506,7 +506,7 @@ void IconDatabase::performReleaseIconForPageURL(const String& pageURLOriginal, i
     ASSERT(!iconRecord || (iconRecord && m_iconURLToRecordMap.get(iconRecord->iconURL()) == iconRecord));
 
     {
     ASSERT(!iconRecord || (iconRecord && m_iconURLToRecordMap.get(iconRecord->iconURL()) == iconRecord));
 
     {
-        DeprecatedMutexLocker locker(m_pendingReadingLock);
+        MutexLocker locker(m_pendingReadingLock);
         
         // Since this pageURL is going away, there's no reason anyone would ever be interested in its read results    
         if (!m_iconURLImportComplete)
         
         // Since this pageURL is going away, there's no reason anyone would ever be interested in its read results    
         if (!m_iconURLImportComplete)
@@ -522,7 +522,7 @@ void IconDatabase::performReleaseIconForPageURL(const String& pageURLOriginal, i
     
     // Mark stuff for deletion from the database only if we're not in private browsing
     if (!m_privateBrowsingEnabled) {
     
     // Mark stuff for deletion from the database only if we're not in private browsing
     if (!m_privateBrowsingEnabled) {
-        DeprecatedMutexLocker locker(m_pendingSyncLock);
+        MutexLocker locker(m_pendingSyncLock);
         m_pageURLsPendingSync.set(pageURLOriginal.isolatedCopy(), pageRecord->snapshot(true));
     
         // If this page is the last page to refer to a particular IconRecord, that IconRecord needs to
         m_pageURLsPendingSync.set(pageURLOriginal.isolatedCopy(), pageRecord->snapshot(true));
     
         // If this page is the last page to refer to a particular IconRecord, that IconRecord needs to
@@ -548,12 +548,12 @@ void IconDatabase::setIconDataForIconURL(PassRefPtr<SharedBuffer> dataOriginal,
     
     Vector<String> pageURLs;
     {
     
     Vector<String> pageURLs;
     {
-        DeprecatedMutexLocker locker(m_urlAndIconLock);
+        MutexLocker locker(m_urlAndIconLock);
     
         // If this icon was pending a read, remove it from that set because this new data should override what is on disk
         RefPtr<IconRecord> icon = m_iconURLToRecordMap.get(iconURL);
         if (icon) {
     
         // If this icon was pending a read, remove it from that set because this new data should override what is on disk
         RefPtr<IconRecord> icon = m_iconURLToRecordMap.get(iconURL);
         if (icon) {
-            DeprecatedMutexLocker locker(m_pendingReadingLock);
+            MutexLocker locker(m_pendingReadingLock);
             m_iconsPendingReading.remove(icon.get());
         } else
             icon = getOrCreateIconRecord(iconURL);
             m_iconsPendingReading.remove(icon.get());
         } else
             icon = getOrCreateIconRecord(iconURL);
@@ -567,7 +567,7 @@ void IconDatabase::setIconDataForIconURL(PassRefPtr<SharedBuffer> dataOriginal,
         
         // Mark the IconRecord as requiring an update to the database only if private browsing is disabled
         if (!m_privateBrowsingEnabled) {
         
         // Mark the IconRecord as requiring an update to the database only if private browsing is disabled
         if (!m_privateBrowsingEnabled) {
-            DeprecatedMutexLocker locker(m_pendingSyncLock);
+            MutexLocker locker(m_pendingSyncLock);
             m_iconsPendingSync.set(iconURL, icon->snapshot());
         }
 
             m_iconsPendingSync.set(iconURL, icon->snapshot());
         }
 
@@ -608,7 +608,7 @@ void IconDatabase::setIconURLForPageURL(const String& iconURLOriginal, const Str
     String iconURL, pageURL;
     
     {
     String iconURL, pageURL;
     
     {
-        DeprecatedMutexLocker locker(m_urlAndIconLock);
+        MutexLocker locker(m_urlAndIconLock);
 
         PageURLRecord* pageRecord = m_pageURLToRecordMap.get(pageURLOriginal);
         
 
         PageURLRecord* pageRecord = m_pageURLToRecordMap.get(pageURLOriginal);
         
@@ -636,13 +636,13 @@ void IconDatabase::setIconURLForPageURL(const String& iconURLOriginal, const Str
             ASSERT(iconRecord->retainingPageURLs().size() == 0);
             LOG(IconDatabase, "Icon for icon url %s is about to be destroyed - removing mapping for it", urlForLogging(iconRecord->iconURL()).ascii().data());
             m_iconURLToRecordMap.remove(iconRecord->iconURL());
             ASSERT(iconRecord->retainingPageURLs().size() == 0);
             LOG(IconDatabase, "Icon for icon url %s is about to be destroyed - removing mapping for it", urlForLogging(iconRecord->iconURL()).ascii().data());
             m_iconURLToRecordMap.remove(iconRecord->iconURL());
-            DeprecatedMutexLocker locker(m_pendingReadingLock);
+            MutexLocker locker(m_pendingReadingLock);
             m_iconsPendingReading.remove(iconRecord.get());
         }
         
         // And mark this mapping to be added to the database
         if (!m_privateBrowsingEnabled) {
             m_iconsPendingReading.remove(iconRecord.get());
         }
         
         // And mark this mapping to be added to the database
         if (!m_privateBrowsingEnabled) {
-            DeprecatedMutexLocker locker(m_pendingSyncLock);
+            MutexLocker locker(m_pendingSyncLock);
             m_pageURLsPendingSync.set(pageURL, pageRecord->snapshot());
             
             // If the icon is on its last ref, mark it for deletion
             m_pageURLsPendingSync.set(pageURL, pageRecord->snapshot());
             
             // If the icon is on its last ref, mark it for deletion
@@ -674,7 +674,7 @@ IconLoadDecision IconDatabase::synchronousLoadDecisionForIconURL(const String& i
     // 1 - When we read the icon urls from disk, getting the timeStamp at the same time
     // 2 - When we get a new icon from the loader, in which case the timestamp is set at that time
     {
     // 1 - When we read the icon urls from disk, getting the timeStamp at the same time
     // 2 - When we get a new icon from the loader, in which case the timestamp is set at that time
     {
-        DeprecatedMutexLocker locker(m_urlAndIconLock);
+        MutexLocker locker(m_urlAndIconLock);
         if (IconRecord* icon = m_iconURLToRecordMap.get(iconURL)) {
             LOG(IconDatabase, "Found expiration time on a present icon based on existing IconRecord");
             return static_cast<int>(currentTime()) - static_cast<int>(icon->getTimestamp()) > iconExpirationTime ? IconLoadYes : IconLoadNo;
         if (IconRecord* icon = m_iconURLToRecordMap.get(iconURL)) {
             LOG(IconDatabase, "Found expiration time on a present icon based on existing IconRecord");
             return static_cast<int>(currentTime()) - static_cast<int>(icon->getTimestamp()) > iconExpirationTime ? IconLoadYes : IconLoadNo;
@@ -682,7 +682,7 @@ IconLoadDecision IconDatabase::synchronousLoadDecisionForIconURL(const String& i
     }
     
     // If we don't have a record for it, but we *have* imported all iconURLs from disk, then we should load it now
     }
     
     // If we don't have a record for it, but we *have* imported all iconURLs from disk, then we should load it now
-    DeprecatedMutexLocker readingLocker(m_pendingReadingLock);
+    MutexLocker readingLocker(m_pendingReadingLock);
     if (m_iconURLImportComplete)
         return IconLoadYes;
         
     if (m_iconURLImportComplete)
         return IconLoadYes;
         
@@ -699,7 +699,7 @@ bool IconDatabase::synchronousIconDataKnownForIconURL(const String& iconURL)
 {
     ASSERT_NOT_SYNC_THREAD();
     
 {
     ASSERT_NOT_SYNC_THREAD();
     
-    DeprecatedMutexLocker locker(m_urlAndIconLock);
+    MutexLocker locker(m_urlAndIconLock);
     if (IconRecord* icon = m_iconURLToRecordMap.get(iconURL))
         return icon->imageDataStatus() != ImageDataStatusUnknown;
 
     if (IconRecord* icon = m_iconURLToRecordMap.get(iconURL))
         return icon->imageDataStatus() != ImageDataStatusUnknown;
 
@@ -754,26 +754,26 @@ void IconDatabase::checkIntegrityBeforeOpening()
 
 size_t IconDatabase::pageURLMappingCount()
 {
 
 size_t IconDatabase::pageURLMappingCount()
 {
-    DeprecatedMutexLocker locker(m_urlAndIconLock);
+    MutexLocker locker(m_urlAndIconLock);
     return m_pageURLToRecordMap.size();
 }
 
 size_t IconDatabase::retainedPageURLCount()
 {
     return m_pageURLToRecordMap.size();
 }
 
 size_t IconDatabase::retainedPageURLCount()
 {
-    DeprecatedMutexLocker locker(m_urlAndIconLock);
+    MutexLocker locker(m_urlAndIconLock);
     performPendingRetainAndReleaseOperations();
     return m_retainedPageURLs.size();
 }
 
 size_t IconDatabase::iconRecordCount()
 {
     performPendingRetainAndReleaseOperations();
     return m_retainedPageURLs.size();
 }
 
 size_t IconDatabase::iconRecordCount()
 {
-    DeprecatedMutexLocker locker(m_urlAndIconLock);
+    MutexLocker locker(m_urlAndIconLock);
     return m_iconURLToRecordMap.size();
 }
 
 size_t IconDatabase::iconRecordCountWithData()
 {
     return m_iconURLToRecordMap.size();
 }
 
 size_t IconDatabase::iconRecordCountWithData()
 {
-    DeprecatedMutexLocker locker(m_urlAndIconLock);
+    MutexLocker locker(m_urlAndIconLock);
     size_t result = 0;
     
     HashMap<String, IconRecord*>::iterator i = m_iconURLToRecordMap.begin();
     size_t result = 0;
     
     HashMap<String, IconRecord*>::iterator i = m_iconURLToRecordMap.begin();
@@ -829,7 +829,7 @@ void IconDatabase::notifyPendingLoadDecisions()
 
 void IconDatabase::wakeSyncThread()
 {
 
 void IconDatabase::wakeSyncThread()
 {
-    DeprecatedMutexLocker locker(m_syncLock);
+    MutexLocker locker(m_syncLock);
 
     if (!m_disableSuddenTerminationWhileSyncThreadHasWorkToDo)
         m_disableSuddenTerminationWhileSyncThreadHasWorkToDo = std::make_unique<SuddenTerminationDisabler>();
 
     if (!m_disableSuddenTerminationWhileSyncThreadHasWorkToDo)
         m_disableSuddenTerminationWhileSyncThreadHasWorkToDo = std::make_unique<SuddenTerminationDisabler>();
@@ -874,13 +874,13 @@ bool IconDatabase::isOpen() const
 
 bool IconDatabase::isOpenBesidesMainThreadCallbacks() const
 {
 
 bool IconDatabase::isOpenBesidesMainThreadCallbacks() const
 {
-    DeprecatedMutexLocker locker(m_syncLock);
+    MutexLocker locker(m_syncLock);
     return m_syncThreadRunning || m_syncDB.isOpen();
 }
 
 String IconDatabase::databasePath() const
 {
     return m_syncThreadRunning || m_syncDB.isOpen();
 }
 
 String IconDatabase::databasePath() const
 {
-    DeprecatedMutexLocker locker(m_syncLock);
+    MutexLocker locker(m_syncLock);
     return m_completeDatabasePath.isolatedCopy();
 }
 
     return m_completeDatabasePath.isolatedCopy();
 }
 
@@ -916,7 +916,7 @@ PageURLRecord* IconDatabase::getOrCreatePageURLRecord(const String& pageURL)
 
     PageURLRecord* pageRecord = m_pageURLToRecordMap.get(pageURL);
     
 
     PageURLRecord* pageRecord = m_pageURLToRecordMap.get(pageURL);
     
-    DeprecatedMutexLocker locker(m_pendingReadingLock);
+    MutexLocker locker(m_pendingReadingLock);
     if (!m_iconURLImportComplete) {
         // 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
         if (!pageRecord) {
     if (!m_iconURLImportComplete) {
         // 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
         if (!pageRecord) {
@@ -985,7 +985,7 @@ void IconDatabase::iconDatabaseSyncThread()
     }
     
     {
     }
     
     {
-        DeprecatedMutexLocker locker(m_syncLock);
+        MutexLocker locker(m_syncLock);
         if (!m_syncDB.open(m_completeDatabasePath)) {
             LOG_ERROR("Unable to open icon database at path %s - %s", m_completeDatabasePath.ascii().data(), m_syncDB.lastErrorMsg());
             return;
         if (!m_syncDB.open(m_completeDatabasePath)) {
             LOG_ERROR("Unable to open icon database at path %s - %s", m_completeDatabasePath.ascii().data(), m_syncDB.lastErrorMsg());
             return;
@@ -1113,7 +1113,7 @@ void IconDatabase::performOpenInitialization()
             m_syncDB.close();
             
             {
             m_syncDB.close();
             
             {
-                DeprecatedMutexLocker locker(m_syncLock);
+                MutexLocker locker(m_syncLock);
                 // Should've been consumed by SQLite, delete just to make sure we don't see it again in the future;
                 deleteFile(m_completeDatabasePath + "-journal");
                 deleteFile(m_completeDatabasePath);
                 // Should've been consumed by SQLite, delete just to make sure we don't see it again in the future;
                 deleteFile(m_completeDatabasePath + "-journal");
                 deleteFile(m_completeDatabasePath);
@@ -1215,7 +1215,7 @@ void IconDatabase::performURLImport()
         String iconURL = query.getColumnText(1);
 
         {
         String iconURL = query.getColumnText(1);
 
         {
-            DeprecatedMutexLocker locker(m_urlAndIconLock);
+            MutexLocker locker(m_urlAndIconLock);
 
             PageURLRecord* pageRecord = m_pageURLToRecordMap.get(pageURL);
             
 
             PageURLRecord* pageRecord = m_pageURLToRecordMap.get(pageURL);
             
@@ -1248,7 +1248,7 @@ void IconDatabase::performURLImport()
         // one for the URL and one for the Image itself
         // Note that WebIconDatabase is not neccessarily API so we might be able to make this change
         {
         // one for the URL and one for the Image itself
         // Note that WebIconDatabase is not neccessarily API so we might be able to make this change
         {
-            DeprecatedMutexLocker locker(m_pendingReadingLock);
+            MutexLocker locker(m_pendingReadingLock);
             if (m_pageURLsPendingImport.contains(pageURL)) {
                 dispatchDidImportIconURLForPageURLOnMainThread(pageURL);
                 m_pageURLsPendingImport.remove(pageURL);
             if (m_pageURLsPendingImport.contains(pageURL)) {
                 dispatchDidImportIconURLForPageURLOnMainThread(pageURL);
                 m_pageURLsPendingImport.remove(pageURL);
@@ -1271,7 +1271,7 @@ void IconDatabase::performURLImport()
     // but after m_iconURLImportComplete is set to true, we don't care about this set anymore
     Vector<String> urls;
     {
     // but after m_iconURLImportComplete is set to true, we don't care about this set anymore
     Vector<String> urls;
     {
-        DeprecatedMutexLocker locker(m_pendingReadingLock);
+        MutexLocker locker(m_pendingReadingLock);
 
         urls.appendRange(m_pageURLsPendingImport.begin(), m_pageURLsPendingImport.end());
         m_pageURLsPendingImport.clear();        
 
         urls.appendRange(m_pageURLsPendingImport.begin(), m_pageURLsPendingImport.end());
         m_pageURLsPendingImport.clear();        
@@ -1284,7 +1284,7 @@ void IconDatabase::performURLImport()
     // Remove unretained ones if database cleanup is allowed
     // Keep a set of ones that are retained and pending notification
     {
     // Remove unretained ones if database cleanup is allowed
     // Keep a set of ones that are retained and pending notification
     {
-        DeprecatedMutexLocker locker(m_urlAndIconLock);
+        MutexLocker locker(m_urlAndIconLock);
 
         performPendingRetainAndReleaseOperations();
 
 
         performPendingRetainAndReleaseOperations();
 
@@ -1301,12 +1301,12 @@ void IconDatabase::performURLImport()
                         m_iconURLToRecordMap.remove(iconRecord->iconURL());
                         
                         {
                         m_iconURLToRecordMap.remove(iconRecord->iconURL());
                         
                         {
-                            DeprecatedMutexLocker locker(m_pendingReadingLock);
+                            MutexLocker locker(m_pendingReadingLock);
                             m_pageURLsInterestedInIcons.remove(urls[i]);
                             m_iconsPendingReading.remove(iconRecord);
                         }
                         {
                             m_pageURLsInterestedInIcons.remove(urls[i]);
                             m_iconsPendingReading.remove(iconRecord);
                         }
                         {
-                            DeprecatedMutexLocker locker(m_pendingSyncLock);
+                            MutexLocker locker(m_pendingSyncLock);
                             m_iconsPendingSync.set(iconRecord->iconURL(), iconRecord->snapshot(true));                    
                         }
                     }
                             m_iconsPendingSync.set(iconRecord->iconURL(), iconRecord->snapshot(true));                    
                         }
                     }
@@ -1371,7 +1371,7 @@ void IconDatabase::syncThreadMainLoop()
             break;
 
         {
             break;
 
         {
-            DeprecatedMutexLocker locker(m_urlAndIconLock);
+            MutexLocker locker(m_urlAndIconLock);
             performPendingRetainAndReleaseOperations();
         }
         
             performPendingRetainAndReleaseOperations();
         }
         
@@ -1451,7 +1451,7 @@ void IconDatabase::performPendingRetainAndReleaseOperations()
     HashCountedSet<String> toRelease;
 
     {
     HashCountedSet<String> toRelease;
 
     {
-        DeprecatedMutexLocker pendingWorkLocker(m_urlsToRetainOrReleaseLock);
+        MutexLocker pendingWorkLocker(m_urlsToRetainOrReleaseLock);
         if (!m_retainOrReleaseIconRequested)
             return;
 
         if (!m_retainOrReleaseIconRequested)
             return;
 
@@ -1488,7 +1488,7 @@ bool IconDatabase::readFromDatabase()
     // This way we won't hold the lock for a long period of time
     Vector<IconRecord*> icons;
     {
     // This way we won't hold the lock for a long period of time
     Vector<IconRecord*> icons;
     {
-        DeprecatedMutexLocker locker(m_pendingReadingLock);
+        MutexLocker locker(m_pendingReadingLock);
         icons.appendRange(m_iconsPendingReading.begin(), m_iconsPendingReading.end());
     }
     
         icons.appendRange(m_iconsPendingReading.begin(), m_iconsPendingReading.end());
     }
     
@@ -1501,9 +1501,9 @@ bool IconDatabase::readFromDatabase()
 
         // Verify this icon still wants to be read from disk
         {
 
         // Verify this icon still wants to be read from disk
         {
-            DeprecatedMutexLocker urlLocker(m_urlAndIconLock);
+            MutexLocker urlLocker(m_urlAndIconLock);
             {
             {
-                DeprecatedMutexLocker readLocker(m_pendingReadingLock);
+                MutexLocker readLocker(m_pendingReadingLock);
                 
                 if (m_iconsPendingReading.contains(icons[i])) {
                     // Set the new data
                 
                 if (m_iconsPendingReading.contains(icons[i])) {
                     // Set the new data
@@ -1591,11 +1591,11 @@ bool IconDatabase::writeToDatabase()
     // we'll pick it up on the next pass.  This greatly simplifies the locking strategy for this method and remains cohesive with changes
     // asked for by the database on the main thread
     {
     // we'll pick it up on the next pass.  This greatly simplifies the locking strategy for this method and remains cohesive with changes
     // asked for by the database on the main thread
     {
-        DeprecatedMutexLocker locker(m_urlAndIconLock);
+        MutexLocker locker(m_urlAndIconLock);
         Vector<IconSnapshot> iconSnapshots;
         Vector<PageURLSnapshot> pageSnapshots;
         {
         Vector<IconSnapshot> iconSnapshots;
         Vector<PageURLSnapshot> pageSnapshots;
         {
-            DeprecatedMutexLocker locker(m_pendingSyncLock);
+            MutexLocker locker(m_pendingSyncLock);
 
             iconSnapshots.appendRange(m_iconsPendingSync.begin().values(), m_iconsPendingSync.end().values());
             m_iconsPendingSync.clear();
 
             iconSnapshots.appendRange(m_iconsPendingSync.begin().values(), m_iconsPendingSync.end().values());
             m_iconsPendingSync.clear();
@@ -1658,7 +1658,7 @@ void IconDatabase::pruneUnretainedIcons()
     
     int result;
     while ((result = pageSQL.step()) == SQLITE_ROW) {
     
     int result;
     while ((result = pageSQL.step()) == SQLITE_ROW) {
-        DeprecatedMutexLocker locker(m_urlAndIconLock);
+        MutexLocker locker(m_urlAndIconLock);
         if (!m_pageURLToRecordMap.contains(pageSQL.getColumnText(1)))
             pageIDsToDelete.append(pageSQL.getColumnInt64(0));
     }
         if (!m_pageURLToRecordMap.contains(pageSQL.getColumnText(1)))
             pageIDsToDelete.append(pageSQL.getColumnInt64(0));
     }
@@ -1791,7 +1791,7 @@ void* IconDatabase::cleanupSyncThread()
     writeToDatabase();
     
     // Close the database
     writeToDatabase();
     
     // Close the database
-    DeprecatedMutexLocker locker(m_syncLock);
+    MutexLocker locker(m_syncLock);
     
     m_databaseDirectory = String();
     m_completeDatabasePath = String();
     
     m_databaseDirectory = String();
     m_completeDatabasePath = String();
index f9edd41..22a30fd 100644 (file)
@@ -141,7 +141,7 @@ private:
     bool m_isEnabled;
     bool m_privateBrowsingEnabled;
 
     bool m_isEnabled;
     bool m_privateBrowsingEnabled;
 
-    mutable DeprecatedMutex m_syncLock;
+    mutable Mutex m_syncLock;
     ThreadCondition m_syncCondition;
     String m_databaseDirectory;
     // Holding m_syncLock is required when accessing m_completeDatabasePath
     ThreadCondition m_syncCondition;
     String m_databaseDirectory;
     // Holding m_syncLock is required when accessing m_completeDatabasePath
@@ -153,24 +153,24 @@ private:
     bool m_syncThreadHasWorkToDo;
     std::unique_ptr<SuddenTerminationDisabler> m_disableSuddenTerminationWhileSyncThreadHasWorkToDo;
 
     bool m_syncThreadHasWorkToDo;
     std::unique_ptr<SuddenTerminationDisabler> m_disableSuddenTerminationWhileSyncThreadHasWorkToDo;
 
-    DeprecatedMutex m_urlAndIconLock;
+    Mutex m_urlAndIconLock;
     // Holding m_urlAndIconLock is required when accessing any of the following data structures or the objects they contain
     HashMap<String, IconRecord*> m_iconURLToRecordMap;
     HashMap<String, PageURLRecord*> m_pageURLToRecordMap;
     HashSet<String> m_retainedPageURLs;
 
     // Holding m_urlAndIconLock is required when accessing any of the following data structures or the objects they contain
     HashMap<String, IconRecord*> m_iconURLToRecordMap;
     HashMap<String, PageURLRecord*> m_pageURLToRecordMap;
     HashSet<String> m_retainedPageURLs;
 
-    DeprecatedMutex m_pendingSyncLock;
+    Mutex m_pendingSyncLock;
     // Holding m_pendingSyncLock is required when accessing any of the following data structures
     HashMap<String, PageURLSnapshot> m_pageURLsPendingSync;
     HashMap<String, IconSnapshot> m_iconsPendingSync;
     
     // Holding m_pendingSyncLock is required when accessing any of the following data structures
     HashMap<String, PageURLSnapshot> m_pageURLsPendingSync;
     HashMap<String, IconSnapshot> m_iconsPendingSync;
     
-    DeprecatedMutex m_pendingReadingLock;    
+    Mutex m_pendingReadingLock;    
     // Holding m_pendingSyncLock is required when accessing any of the following data structures - when dealing with IconRecord*s, holding m_urlAndIconLock is also required
     HashSet<String> m_pageURLsPendingImport;
     HashSet<String> m_pageURLsInterestedInIcons;
     HashSet<IconRecord*> m_iconsPendingReading;
 
     // Holding m_pendingSyncLock is required when accessing any of the following data structures - when dealing with IconRecord*s, holding m_urlAndIconLock is also required
     HashSet<String> m_pageURLsPendingImport;
     HashSet<String> m_pageURLsInterestedInIcons;
     HashSet<IconRecord*> m_iconsPendingReading;
 
-    DeprecatedMutex m_urlsToRetainOrReleaseLock;
+    Mutex m_urlsToRetainOrReleaseLock;
     // Holding m_urlsToRetainOrReleaseLock is required when accessing any of the following data structures.
     HashCountedSet<String> m_urlsToRetain;
     HashCountedSet<String> m_urlsToRelease;
     // Holding m_urlsToRetainOrReleaseLock is required when accessing any of the following data structures.
     HashCountedSet<String> m_urlsToRetain;
     HashCountedSet<String> m_urlsToRelease;
index 7fc575e..7892abf 100644 (file)
@@ -49,7 +49,7 @@ ScrollingTree::~ScrollingTree()
 bool ScrollingTree::shouldHandleWheelEventSynchronously(const PlatformWheelEvent& wheelEvent)
 {
     // This method is invoked by the event handling thread
 bool ScrollingTree::shouldHandleWheelEventSynchronously(const PlatformWheelEvent& wheelEvent)
 {
     // This method is invoked by the event handling thread
-    DeprecatedMutexLocker lock(m_mutex);
+    MutexLocker lock(m_mutex);
 
     bool shouldSetLatch = wheelEvent.shouldConsiderLatching();
     
 
     bool shouldSetLatch = wheelEvent.shouldConsiderLatching();
     
@@ -115,7 +115,7 @@ void ScrollingTree::commitNewTreeState(std::unique_ptr<ScrollingStateTree> scrol
         && (rootStateNodeChanged
             || rootNode->hasChangedProperty(ScrollingStateFrameScrollingNode::NonFastScrollableRegion)
             || rootNode->hasChangedProperty(ScrollingStateNode::ScrollLayer))) {
         && (rootStateNodeChanged
             || rootNode->hasChangedProperty(ScrollingStateFrameScrollingNode::NonFastScrollableRegion)
             || rootNode->hasChangedProperty(ScrollingStateNode::ScrollLayer))) {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
 
         if (rootStateNodeChanged || rootNode->hasChangedProperty(ScrollingStateNode::ScrollLayer))
             m_mainFrameScrollPosition = FloatPoint();
 
         if (rootStateNodeChanged || rootNode->hasChangedProperty(ScrollingStateNode::ScrollLayer))
             m_mainFrameScrollPosition = FloatPoint();
@@ -208,7 +208,7 @@ ScrollingTreeNode* ScrollingTree::nodeForID(ScrollingNodeID nodeID) const
 
 void ScrollingTree::setMainFramePinState(bool pinnedToTheLeft, bool pinnedToTheRight, bool pinnedToTheTop, bool pinnedToTheBottom)
 {
 
 void ScrollingTree::setMainFramePinState(bool pinnedToTheLeft, bool pinnedToTheRight, bool pinnedToTheTop, bool pinnedToTheBottom)
 {
-    DeprecatedMutexLocker locker(m_swipeStateMutex);
+    MutexLocker locker(m_swipeStateMutex);
 
     m_mainFramePinnedToTheLeft = pinnedToTheLeft;
     m_mainFramePinnedToTheRight = pinnedToTheRight;
 
     m_mainFramePinnedToTheLeft = pinnedToTheLeft;
     m_mainFramePinnedToTheRight = pinnedToTheRight;
@@ -218,54 +218,54 @@ void ScrollingTree::setMainFramePinState(bool pinnedToTheLeft, bool pinnedToTheR
 
 FloatPoint ScrollingTree::mainFrameScrollPosition()
 {
 
 FloatPoint ScrollingTree::mainFrameScrollPosition()
 {
-    DeprecatedMutexLocker lock(m_mutex);
+    MutexLocker lock(m_mutex);
     return m_mainFrameScrollPosition;
 }
 
 void ScrollingTree::setMainFrameScrollPosition(FloatPoint position)
 {
     return m_mainFrameScrollPosition;
 }
 
 void ScrollingTree::setMainFrameScrollPosition(FloatPoint position)
 {
-    DeprecatedMutexLocker lock(m_mutex);
+    MutexLocker lock(m_mutex);
     m_mainFrameScrollPosition = position;
 }
 
 bool ScrollingTree::isPointInNonFastScrollableRegion(IntPoint p)
 {
     m_mainFrameScrollPosition = position;
 }
 
 bool ScrollingTree::isPointInNonFastScrollableRegion(IntPoint p)
 {
-    DeprecatedMutexLocker lock(m_mutex);
+    MutexLocker lock(m_mutex);
     
     return m_nonFastScrollableRegion.contains(p);
 }
 
 bool ScrollingTree::isRubberBandInProgress()
 {
     
     return m_nonFastScrollableRegion.contains(p);
 }
 
 bool ScrollingTree::isRubberBandInProgress()
 {
-    DeprecatedMutexLocker lock(m_mutex);    
+    MutexLocker lock(m_mutex);    
 
     return m_mainFrameIsRubberBanding;
 }
 
 void ScrollingTree::setMainFrameIsRubberBanding(bool isRubberBanding)
 {
 
     return m_mainFrameIsRubberBanding;
 }
 
 void ScrollingTree::setMainFrameIsRubberBanding(bool isRubberBanding)
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     m_mainFrameIsRubberBanding = isRubberBanding;
 }
 
 bool ScrollingTree::isScrollSnapInProgress()
 {
 
     m_mainFrameIsRubberBanding = isRubberBanding;
 }
 
 bool ScrollingTree::isScrollSnapInProgress()
 {
-    DeprecatedMutexLocker lock(m_mutex);
+    MutexLocker lock(m_mutex);
     
     return m_mainFrameIsScrollSnapping;
 }
     
 void ScrollingTree::setMainFrameIsScrollSnapping(bool isScrollSnapping)
 {
     
     return m_mainFrameIsScrollSnapping;
 }
     
 void ScrollingTree::setMainFrameIsScrollSnapping(bool isScrollSnapping)
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
     
     m_mainFrameIsScrollSnapping = isScrollSnapping;
 }
 
 void ScrollingTree::setCanRubberBandState(bool canRubberBandAtLeft, bool canRubberBandAtRight, bool canRubberBandAtTop, bool canRubberBandAtBottom)
 {
     
     m_mainFrameIsScrollSnapping = isScrollSnapping;
 }
 
 void ScrollingTree::setCanRubberBandState(bool canRubberBandAtLeft, bool canRubberBandAtRight, bool canRubberBandAtTop, bool canRubberBandAtBottom)
 {
-    DeprecatedMutexLocker locker(m_swipeStateMutex);
+    MutexLocker locker(m_swipeStateMutex);
 
     m_rubberBandsAtLeft = canRubberBandAtLeft;
     m_rubberBandsAtRight = canRubberBandAtRight;
 
     m_rubberBandsAtLeft = canRubberBandAtLeft;
     m_rubberBandsAtRight = canRubberBandAtRight;
@@ -275,28 +275,28 @@ void ScrollingTree::setCanRubberBandState(bool canRubberBandAtLeft, bool canRubb
 
 bool ScrollingTree::rubberBandsAtLeft()
 {
 
 bool ScrollingTree::rubberBandsAtLeft()
 {
-    DeprecatedMutexLocker lock(m_swipeStateMutex);
+    MutexLocker lock(m_swipeStateMutex);
 
     return m_rubberBandsAtLeft;
 }
 
 bool ScrollingTree::rubberBandsAtRight()
 {
 
     return m_rubberBandsAtLeft;
 }
 
 bool ScrollingTree::rubberBandsAtRight()
 {
-    DeprecatedMutexLocker lock(m_swipeStateMutex);
+    MutexLocker lock(m_swipeStateMutex);
 
     return m_rubberBandsAtRight;
 }
 
 bool ScrollingTree::rubberBandsAtBottom()
 {
 
     return m_rubberBandsAtRight;
 }
 
 bool ScrollingTree::rubberBandsAtBottom()
 {
-    DeprecatedMutexLocker lock(m_swipeStateMutex);
+    MutexLocker lock(m_swipeStateMutex);
 
     return m_rubberBandsAtBottom;
 }
 
 bool ScrollingTree::rubberBandsAtTop()
 {
 
     return m_rubberBandsAtBottom;
 }
 
 bool ScrollingTree::rubberBandsAtTop()
 {
-    DeprecatedMutexLocker lock(m_swipeStateMutex);
+    MutexLocker lock(m_swipeStateMutex);
 
     return m_rubberBandsAtTop;
 }
 
     return m_rubberBandsAtTop;
 }
@@ -308,14 +308,14 @@ bool ScrollingTree::isHandlingProgrammaticScroll()
 
 void ScrollingTree::setScrollPinningBehavior(ScrollPinningBehavior pinning)
 {
 
 void ScrollingTree::setScrollPinningBehavior(ScrollPinningBehavior pinning)
 {
-    DeprecatedMutexLocker locker(m_swipeStateMutex);
+    MutexLocker locker(m_swipeStateMutex);
     
     m_scrollPinningBehavior = pinning;
 }
 
 ScrollPinningBehavior ScrollingTree::scrollPinningBehavior()
 {
     
     m_scrollPinningBehavior = pinning;
 }
 
 ScrollPinningBehavior ScrollingTree::scrollPinningBehavior()
 {
-    DeprecatedMutexLocker lock(m_swipeStateMutex);
+    MutexLocker lock(m_swipeStateMutex);
     
     return m_scrollPinningBehavior;
 }
     
     return m_scrollPinningBehavior;
 }
@@ -325,7 +325,7 @@ bool ScrollingTree::willWheelEventStartSwipeGesture(const PlatformWheelEvent& wh
     if (wheelEvent.phase() != PlatformWheelEventPhaseBegan)
         return false;
 
     if (wheelEvent.phase() != PlatformWheelEventPhaseBegan)
         return false;
 
-    DeprecatedMutexLocker lock(m_swipeStateMutex);
+    MutexLocker lock(m_swipeStateMutex);
 
     if (wheelEvent.deltaX() > 0 && m_mainFramePinnedToTheLeft && !m_rubberBandsAtLeft)
         return true;
 
     if (wheelEvent.deltaX() > 0 && m_mainFramePinnedToTheLeft && !m_rubberBandsAtLeft)
         return true;
@@ -351,19 +351,19 @@ bool ScrollingTree::scrollingPerformanceLoggingEnabled()
 
 ScrollingNodeID ScrollingTree::latchedNode()
 {
 
 ScrollingNodeID ScrollingTree::latchedNode()
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
     return m_latchedNode;
 }
 
 void ScrollingTree::setLatchedNode(ScrollingNodeID node)
 {
     return m_latchedNode;
 }
 
 void ScrollingTree::setLatchedNode(ScrollingNodeID node)
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
     m_latchedNode = node;
 }
 
 void ScrollingTree::clearLatchedNode()
 {
     m_latchedNode = node;
 }
 
 void ScrollingTree::clearLatchedNode()
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
     m_latchedNode = 0;
 }
 
     m_latchedNode = 0;
 }
 
index 7d10c05..12cb26f 100644 (file)
@@ -160,11 +160,11 @@ private:
     typedef HashMap<ScrollingNodeID, ScrollingTreeNode*> ScrollingTreeNodeMap;
     ScrollingTreeNodeMap m_nodeMap;
 
     typedef HashMap<ScrollingNodeID, ScrollingTreeNode*> ScrollingTreeNodeMap;
     ScrollingTreeNodeMap m_nodeMap;
 
-    DeprecatedMutex m_mutex;
+    Mutex m_mutex;
     Region m_nonFastScrollableRegion;
     FloatPoint m_mainFrameScrollPosition;
 
     Region m_nonFastScrollableRegion;
     FloatPoint m_mainFrameScrollPosition;
 
-    DeprecatedMutex m_swipeStateMutex;
+    Mutex m_swipeStateMutex;
     ScrollPinningBehavior m_scrollPinningBehavior { DoNotPin };
     ScrollingNodeID m_latchedNode { 0 };
 
     ScrollPinningBehavior m_scrollPinningBehavior { DoNotPin };
     ScrollingNodeID m_latchedNode { 0 };
 
index 079dac2..5571058 100644 (file)
@@ -137,7 +137,7 @@ private:
     bool m_clearPressureOnMemoryRelease;
     void (^m_releaseMemoryBlock)();
     CFRunLoopObserverRef m_observer;
     bool m_clearPressureOnMemoryRelease;
     void (^m_releaseMemoryBlock)();
     CFRunLoopObserverRef m_observer;
-    DeprecatedMutex m_observerMutex;
+    Mutex m_observerMutex;
 #elif OS(LINUX)
     int m_eventFD;
     int m_pressureLevelFD;
 #elif OS(LINUX)
     int m_eventFD;
     int m_pressureLevelFD;
index 7c21f1f..dd55938 100644 (file)
@@ -102,7 +102,7 @@ void HRTFDatabaseLoader::loadAsynchronously()
 {
     ASSERT(isMainThread());
 
 {
     ASSERT(isMainThread());
 
-    DeprecatedMutexLocker locker(m_threadLock);
+    MutexLocker locker(m_threadLock);
     
     if (!m_hrtfDatabase.get() && !m_databaseLoaderThread) {
         // Start the asynchronous database loading process.
     
     if (!m_hrtfDatabase.get() && !m_databaseLoaderThread) {
         // Start the asynchronous database loading process.
@@ -117,7 +117,7 @@ bool HRTFDatabaseLoader::isLoaded() const
 
 void HRTFDatabaseLoader::waitForLoaderThreadCompletion()
 {
 
 void HRTFDatabaseLoader::waitForLoaderThreadCompletion()
 {
-    DeprecatedMutexLocker locker(m_threadLock);
+    MutexLocker locker(m_threadLock);
     
     // waitForThreadCompletion() should not be called twice for the same thread.
     if (m_databaseLoaderThread)
     
     // waitForThreadCompletion() should not be called twice for the same thread.
     if (m_databaseLoaderThread)
index 5bb5a54..417b490 100644 (file)
@@ -76,7 +76,7 @@ private:
     std::unique_ptr<HRTFDatabase> m_hrtfDatabase;
 
     // Holding a m_threadLock is required when accessing m_databaseLoaderThread.
     std::unique_ptr<HRTFDatabase> m_hrtfDatabase;
 
     // Holding a m_threadLock is required when accessing m_databaseLoaderThread.
-    DeprecatedMutex m_threadLock;
+    Mutex m_threadLock;
     ThreadIdentifier m_databaseLoaderThread;
 
     float m_databaseSampleRate;
     ThreadIdentifier m_databaseLoaderThread;
 
     float m_databaseSampleRate;
index 46c47ab..5ed366d 100644 (file)
@@ -256,7 +256,7 @@ void MemoryPressureHandler::setReceivedMemoryPressure(MemoryPressureReason reaso
     m_underMemoryPressure = true;
 
     {
     m_underMemoryPressure = true;
 
     {
-        DeprecatedMutexLocker locker(m_observerMutex);
+        MutexLocker locker(m_observerMutex);
         if (!m_observer) {
             m_observer = CFRunLoopObserverCreate(NULL, kCFRunLoopBeforeWaiting | kCFRunLoopExit, NO /* don't repeat */,
                 0, WebCore::respondToMemoryPressureCallback, NULL);
         if (!m_observer) {
             m_observer = CFRunLoopObserverCreate(NULL, kCFRunLoopBeforeWaiting | kCFRunLoopExit, NO /* don't repeat */,
                 0, WebCore::respondToMemoryPressureCallback, NULL);
@@ -272,14 +272,14 @@ void MemoryPressureHandler::clearMemoryPressure()
     m_underMemoryPressure = false;
 
     {
     m_underMemoryPressure = false;
 
     {
-        DeprecatedMutexLocker locker(m_observerMutex);
+        MutexLocker locker(m_observerMutex);
         m_memoryPressureReason = MemoryPressureReasonNone;
     }
 }
 
 bool MemoryPressureHandler::shouldWaitForMemoryClearMessage()
 {
         m_memoryPressureReason = MemoryPressureReasonNone;
     }
 }
 
 bool MemoryPressureHandler::shouldWaitForMemoryClearMessage()
 {
-    DeprecatedMutexLocker locker(m_observerMutex);
+    MutexLocker locker(m_observerMutex);
     return m_memoryPressureReason & MemoryPressureReasonVMStatus;
 }
 
     return m_memoryPressureReason & MemoryPressureReasonVMStatus;
 }
 
@@ -288,7 +288,7 @@ void MemoryPressureHandler::respondToMemoryPressureIfNeeded()
     ASSERT(WebThreadIsLockedOrDisabled());
 
     {
     ASSERT(WebThreadIsLockedOrDisabled());
 
     {
-        DeprecatedMutexLocker locker(m_observerMutex);
+        MutexLocker locker(m_observerMutex);
         m_observer = 0;
     }
 
         m_observer = 0;
     }
 
index 64c74d9..f23808c 100644 (file)
@@ -89,7 +89,7 @@ void DisplayRefreshMonitor::displayDidRefresh()
     double monotonicAnimationStartTime;
 
     {
     double monotonicAnimationStartTime;
 
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         if (!m_scheduled)
             ++m_unscheduledFireCount;
         else
         if (!m_scheduled)
             ++m_unscheduledFireCount;
         else
@@ -121,7 +121,7 @@ void DisplayRefreshMonitor::displayDidRefresh()
         m_clientsToBeNotified = nullptr;
 
     {
         m_clientsToBeNotified = nullptr;
 
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         m_previousFrameDone = true;
     }
     
         m_previousFrameDone = true;
     }
     
index 41c1cce..bb8c961 100644 (file)
@@ -72,7 +72,7 @@ public:
 
     void setMonotonicAnimationStartTime(double startTime) { m_monotonicAnimationStartTime = startTime; }
 
 
     void setMonotonicAnimationStartTime(double startTime) { m_monotonicAnimationStartTime = startTime; }
 
-    DeprecatedMutex& mutex() { return m_mutex; }
+    Mutex& mutex() { return m_mutex; }
 
     static RefPtr<DisplayRefreshMonitor> createDefaultDisplayRefreshMonitor(PlatformDisplayID);
 
 
     static RefPtr<DisplayRefreshMonitor> createDefaultDisplayRefreshMonitor(PlatformDisplayID);
 
@@ -89,7 +89,7 @@ private:
     bool m_previousFrameDone;
     int m_unscheduledFireCount; // Number of times the display link has fired with no clients.
     PlatformDisplayID m_displayID;
     bool m_previousFrameDone;
     int m_unscheduledFireCount; // Number of times the display link has fired with no clients.
     PlatformDisplayID m_displayID;
-    DeprecatedMutex m_mutex;
+    Mutex m_mutex;
 
     HashSet<DisplayRefreshMonitorClient*> m_clients;
     HashSet<DisplayRefreshMonitorClient*>* m_clientsToBeNotified;
 
     HashSet<DisplayRefreshMonitorClient*> m_clients;
     HashSet<DisplayRefreshMonitorClient*>* m_clientsToBeNotified;
index a5d1459..c5df5e9 100644 (file)
@@ -740,7 +740,7 @@ void MediaPlayerPrivateAVFoundation::setPreload(MediaPlayer::Preload preload)
 
 void MediaPlayerPrivateAVFoundation::setDelayCallbacks(bool delay) const
 {
 
 void MediaPlayerPrivateAVFoundation::setDelayCallbacks(bool delay) const
 {
-    DeprecatedMutexLocker lock(m_queueMutex);
+    MutexLocker lock(m_queueMutex);
     if (delay)
         ++m_delayCallbacks;
     else {
     if (delay)
         ++m_delayCallbacks;
     else {
@@ -759,7 +759,7 @@ void MediaPlayerPrivateAVFoundation::mainThreadCallback(void* context)
 
 void MediaPlayerPrivateAVFoundation::clearMainThreadPendingFlag()
 {
 
 void MediaPlayerPrivateAVFoundation::clearMainThreadPendingFlag()
 {
-    DeprecatedMutexLocker lock(m_queueMutex);
+    MutexLocker lock(m_queueMutex);
     m_mainThreadCallPending = false;
 }
 
     m_mainThreadCallPending = false;
 }
 
@@ -825,7 +825,7 @@ void MediaPlayerPrivateAVFoundation::dispatchNotification()
 
     Notification notification = Notification();
     {
 
     Notification notification = Notification();
     {
-        DeprecatedMutexLocker lock(m_queueMutex);
+        MutexLocker lock(m_queueMutex);
         
         if (m_queuedNotifications.isEmpty())
             return;
         
         if (m_queuedNotifications.isEmpty())
             return;
index 22c3487..a84d377 100644 (file)
@@ -317,7 +317,7 @@ private:
     std::function<void()> m_pendingSeek;
 
     Vector<Notification> m_queuedNotifications;
     std::function<void()> m_pendingSeek;
 
     Vector<Notification> m_queuedNotifications;
-    mutable DeprecatedMutex m_queueMutex;
+    mutable Mutex m_queueMutex;
 
     mutable std::unique_ptr<PlatformTimeRanges> m_cachedLoadedTimeRanges;
 
 
     mutable std::unique_ptr<PlatformTimeRanges> m_cachedLoadedTimeRanges;
 
index c094034..a426281 100644 (file)
@@ -157,7 +157,7 @@ public:
 private:
     inline void* callbackContext() const { return reinterpret_cast<void*>(m_objectID); }
 
 private:
     inline void* callbackContext() const { return reinterpret_cast<void*>(m_objectID); }
 
-    static DeprecatedMutex& mapLock();
+    static Mutex& mapLock();
     static HashMap<uintptr_t, AVFWrapper*>& map();
     static AVFWrapper* avfWrapperForCallbackContext(void*);
     void addToMap();
     static HashMap<uintptr_t, AVFWrapper*>& map();
     static AVFWrapper* avfWrapperForCallbackContext(void*);
     void addToMap();
@@ -1403,9 +1403,9 @@ AVFWrapper::~AVFWrapper()
     m_avPlayer = 0;
 }
 
     m_avPlayer = 0;
 }
 
-DeprecatedMutex& AVFWrapper::mapLock()
+Mutex& AVFWrapper::mapLock()
 {
 {
-    static DeprecatedMutex mapLock;
+    static Mutex mapLock;
     return mapLock;
 }
 
     return mapLock;
 }
 
@@ -1417,7 +1417,7 @@ HashMap<uintptr_t, AVFWrapper*>& AVFWrapper::map()
 
 void AVFWrapper::addToMap()
 {
 
 void AVFWrapper::addToMap()
 {
-    DeprecatedMutexLocker locker(mapLock());
+    MutexLocker locker(mapLock());
     
     // HashMap doesn't like a key of 0, and also make sure we aren't
     // using an object ID that's already in use.
     
     // HashMap doesn't like a key of 0, and also make sure we aren't
     // using an object ID that's already in use.
@@ -1433,7 +1433,7 @@ void AVFWrapper::removeFromMap() const
 {
     LOG(Media, "AVFWrapper::removeFromMap(%p %d)", this, m_objectID);
 
 {
     LOG(Media, "AVFWrapper::removeFromMap(%p %d)", this, m_objectID);
 
-    DeprecatedMutexLocker locker(mapLock());
+    MutexLocker locker(mapLock());
     map().remove(m_objectID);
 }
 
     map().remove(m_objectID);
 }
 
@@ -1634,7 +1634,7 @@ void AVFWrapper::createPlayerItem()
 
 void AVFWrapper::periodicTimeObserverCallback(AVCFPlayerRef, CMTime cmTime, void* context)
 {
 
 void AVFWrapper::periodicTimeObserverCallback(AVCFPlayerRef, CMTime cmTime, void* context)
 {
-    DeprecatedMutexLocker locker(mapLock());
+    MutexLocker locker(mapLock());
     AVFWrapper* self = avfWrapperForCallbackContext(context);
     if (!self) {
         LOG(Media, "AVFWrapper::periodicTimeObserverCallback invoked for deleted AVFWrapper %d", reinterpret_cast<uintptr_t>(context));
     AVFWrapper* self = avfWrapperForCallbackContext(context);
     if (!self) {
         LOG(Media, "AVFWrapper::periodicTimeObserverCallback invoked for deleted AVFWrapper %d", reinterpret_cast<uintptr_t>(context));
@@ -1665,7 +1665,7 @@ void AVFWrapper::processNotification(void* context)
 
     std::unique_ptr<NotificationCallbackData> notificationData { static_cast<NotificationCallbackData*>(context) };
 
 
     std::unique_ptr<NotificationCallbackData> notificationData { static_cast<NotificationCallbackData*>(context) };
 
-    DeprecatedMutexLocker locker(mapLock());
+    MutexLocker locker(mapLock());
     AVFWrapper* self = avfWrapperForCallbackContext(notificationData->m_context);
     if (!self) {
         LOG(Media, "AVFWrapper::processNotification invoked for deleted AVFWrapper %d", reinterpret_cast<uintptr_t>(context));
     AVFWrapper* self = avfWrapperForCallbackContext(notificationData->m_context);
     if (!self) {
         LOG(Media, "AVFWrapper::processNotification invoked for deleted AVFWrapper %d", reinterpret_cast<uintptr_t>(context));
@@ -1720,7 +1720,7 @@ void AVFWrapper::notificationCallback(CFNotificationCenterRef, void* observer, C
 
 void AVFWrapper::loadPlayableCompletionCallback(AVCFAssetRef, void* context)
 {
 
 void AVFWrapper::loadPlayableCompletionCallback(AVCFAssetRef, void* context)
 {
-    DeprecatedMutexLocker locker(mapLock());
+    MutexLocker locker(mapLock());
     AVFWrapper* self = avfWrapperForCallbackContext(context);
     if (!self) {
         LOG(Media, "AVFWrapper::loadPlayableCompletionCallback invoked for deleted AVFWrapper %d", reinterpret_cast<uintptr_t>(context));
     AVFWrapper* self = avfWrapperForCallbackContext(context);
     if (!self) {
         LOG(Media, "AVFWrapper::loadPlayableCompletionCallback invoked for deleted AVFWrapper %d", reinterpret_cast<uintptr_t>(context));
@@ -1748,7 +1748,7 @@ void AVFWrapper::checkPlayability()
 
 void AVFWrapper::loadMetadataCompletionCallback(AVCFAssetRef, void* context)
 {
 
 void AVFWrapper::loadMetadataCompletionCallback(AVCFAssetRef, void* context)
 {
-    DeprecatedMutexLocker locker(mapLock());
+    MutexLocker locker(mapLock());
     AVFWrapper* self = avfWrapperForCallbackContext(context);
     if (!self) {
         LOG(Media, "AVFWrapper::loadMetadataCompletionCallback invoked for deleted AVFWrapper %d", reinterpret_cast<uintptr_t>(context));
     AVFWrapper* self = avfWrapperForCallbackContext(context);
     if (!self) {
         LOG(Media, "AVFWrapper::loadMetadataCompletionCallback invoked for deleted AVFWrapper %d", reinterpret_cast<uintptr_t>(context));
@@ -1768,7 +1768,7 @@ void AVFWrapper::beginLoadingMetadata()
 
 void AVFWrapper::seekCompletedCallback(AVCFPlayerItemRef, Boolean finished, void* context)
 {
 
 void AVFWrapper::seekCompletedCallback(AVCFPlayerItemRef, Boolean finished, void* context)
 {
-    DeprecatedMutexLocker locker(mapLock());
+    MutexLocker locker(mapLock());
     AVFWrapper* self = avfWrapperForCallbackContext(context);
     if (!self) {
         LOG(Media, "AVFWrapper::seekCompletedCallback invoked for deleted AVFWrapper %d", reinterpret_cast<uintptr_t>(context));
     AVFWrapper* self = avfWrapperForCallbackContext(context);
     if (!self) {
         LOG(Media, "AVFWrapper::seekCompletedCallback invoked for deleted AVFWrapper %d", reinterpret_cast<uintptr_t>(context));
@@ -1811,7 +1811,7 @@ void AVFWrapper::processCue(void* context)
 
     std::unique_ptr<LegibleOutputData> legibleOutputData(reinterpret_cast<LegibleOutputData*>(context));
 
 
     std::unique_ptr<LegibleOutputData> legibleOutputData(reinterpret_cast<LegibleOutputData*>(context));
 
-    DeprecatedMutexLocker locker(mapLock());
+    MutexLocker locker(mapLock());
     AVFWrapper* self = avfWrapperForCallbackContext(legibleOutputData->m_context);
     if (!self) {
         LOG(Media, "AVFWrapper::processCue invoked for deleted AVFWrapper %d", reinterpret_cast<uintptr_t>(context));
     AVFWrapper* self = avfWrapperForCallbackContext(legibleOutputData->m_context);
     if (!self) {
         LOG(Media, "AVFWrapper::processCue invoked for deleted AVFWrapper %d", reinterpret_cast<uintptr_t>(context));
@@ -1827,7 +1827,7 @@ void AVFWrapper::processCue(void* context)
 void AVFWrapper::legibleOutputCallback(void* context, AVCFPlayerItemLegibleOutputRef legibleOutput, CFArrayRef attributedStrings, CFArrayRef nativeSampleBuffers, CMTime itemTime)
 {
     ASSERT(!isMainThread());
 void AVFWrapper::legibleOutputCallback(void* context, AVCFPlayerItemLegibleOutputRef legibleOutput, CFArrayRef attributedStrings, CFArrayRef nativeSampleBuffers, CMTime itemTime)
 {
     ASSERT(!isMainThread());
-    DeprecatedMutexLocker locker(mapLock());
+    MutexLocker locker(mapLock());
     AVFWrapper* self = avfWrapperForCallbackContext(context);
     if (!self) {
         LOG(Media, "AVFWrapper::legibleOutputCallback invoked for deleted AVFWrapper %d", reinterpret_cast<uintptr_t>(context));
     AVFWrapper* self = avfWrapperForCallbackContext(context);
     if (!self) {
         LOG(Media, "AVFWrapper::legibleOutputCallback invoked for deleted AVFWrapper %d", reinterpret_cast<uintptr_t>(context));
@@ -1865,7 +1865,7 @@ void AVFWrapper::processShouldWaitForLoadingOfResource(void* context)
 
     std::unique_ptr<LoadRequestData> loadRequestData(reinterpret_cast<LoadRequestData*>(context));
 
 
     std::unique_ptr<LoadRequestData> loadRequestData(reinterpret_cast<LoadRequestData*>(context));
 
-    DeprecatedMutexLocker locker(mapLock());
+    MutexLocker locker(mapLock());
     AVFWrapper* self = avfWrapperForCallbackContext(loadRequestData->m_context);
     if (!self) {
         LOG(Media, "AVFWrapper::processShouldWaitForLoadingOfResource invoked for deleted AVFWrapper %d", reinterpret_cast<uintptr_t>(context));
     AVFWrapper* self = avfWrapperForCallbackContext(loadRequestData->m_context);
     if (!self) {
         LOG(Media, "AVFWrapper::processShouldWaitForLoadingOfResource invoked for deleted AVFWrapper %d", reinterpret_cast<uintptr_t>(context));
@@ -1921,7 +1921,7 @@ bool AVFWrapper::shouldWaitForLoadingOfResource(AVCFAssetResourceLoadingRequestR
 Boolean AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource(AVCFAssetResourceLoaderRef resourceLoader, AVCFAssetResourceLoadingRequestRef loadingRequest, void *context)
 {
     ASSERT(dispatch_get_main_queue() != dispatch_get_current_queue());
 Boolean AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource(AVCFAssetResourceLoaderRef resourceLoader, AVCFAssetResourceLoadingRequestRef loadingRequest, void *context)
 {
     ASSERT(dispatch_get_main_queue() != dispatch_get_current_queue());
-    DeprecatedMutexLocker locker(mapLock());
+    MutexLocker locker(mapLock());
     AVFWrapper* self = avfWrapperForCallbackContext(context);
     if (!self) {
         LOG(Media, "AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource invoked for deleted AVFWrapper %d", reinterpret_cast<uintptr_t>(context));
     AVFWrapper* self = avfWrapperForCallbackContext(context);
     if (!self) {
         LOG(Media, "AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource invoked for deleted AVFWrapper %d", reinterpret_cast<uintptr_t>(context));
index d39419a..29e884b 100644 (file)
@@ -77,7 +77,7 @@ void InbandTextTrackPrivateGStreamer::handleSample(GRefPtr<GstSample> sample)
 {
     m_sampleTimerHandler.cancel();
     {
 {
     m_sampleTimerHandler.cancel();
     {
-        DeprecatedMutexLocker lock(m_sampleMutex);
+        MutexLocker lock(m_sampleMutex);
         m_pendingSamples.append(sample);
     }
     m_sampleTimerHandler.schedule("[WebKit] InbandTextTrackPrivateGStreamer::notifyTrackOfSample", std::function<void()>(std::bind(&InbandTextTrackPrivateGStreamer::notifyTrackOfSample, this)));
         m_pendingSamples.append(sample);
     }
     m_sampleTimerHandler.schedule("[WebKit] InbandTextTrackPrivateGStreamer::notifyTrackOfSample", std::function<void()>(std::bind(&InbandTextTrackPrivateGStreamer::notifyTrackOfSample, this)));
@@ -92,7 +92,7 @@ void InbandTextTrackPrivateGStreamer::notifyTrackOfSample()
 {
     Vector<GRefPtr<GstSample> > samples;
     {
 {
     Vector<GRefPtr<GstSample> > samples;
     {
-        DeprecatedMutexLocker lock(m_sampleMutex);
+        MutexLocker lock(m_sampleMutex);
         m_pendingSamples.swap(samples);
     }
 
         m_pendingSamples.swap(samples);
     }
 
index 89bfabc..b7dffa7 100644 (file)
@@ -67,7 +67,7 @@ private:
     gulong m_eventProbe;
     Vector<GRefPtr<GstSample> > m_pendingSamples;
     String m_streamId;
     gulong m_eventProbe;
     Vector<GRefPtr<GstSample> > m_pendingSamples;
     String m_streamId;
-    DeprecatedMutex m_sampleMutex;
+    Mutex m_sampleMutex;
 };
 
 } // namespace WebCore
 };
 
 } // namespace WebCore
index e411dcc..d91fd1e 100644 (file)
@@ -102,7 +102,7 @@ void TrackPrivateBaseGStreamer::tagsChanged()
     GRefPtr<GstTagList> tags;
     g_object_get(m_pad.get(), "tags", &tags.outPtr(), NULL);
     {
     GRefPtr<GstTagList> tags;
     g_object_get(m_pad.get(), "tags", &tags.outPtr(), NULL);
     {
-        DeprecatedMutexLocker lock(m_tagMutex);
+        MutexLocker lock(m_tagMutex);
         m_tags.swap(tags);
     }
 
         m_tags.swap(tags);
     }
 
@@ -158,7 +158,7 @@ void TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged()
 
     GRefPtr<GstTagList> tags;
     {
 
     GRefPtr<GstTagList> tags;
     {
-        DeprecatedMutexLocker lock(m_tagMutex);
+        MutexLocker lock(m_tagMutex);
         tags.swap(m_tags);
     }
     if (!tags)
         tags.swap(m_tags);
     }
     if (!tags)
index 0647267..e3d6f41 100644 (file)
@@ -73,7 +73,7 @@ private:
     GThreadSafeMainLoopSource m_activeTimerHandler;
     GThreadSafeMainLoopSource m_tagTimerHandler;
 
     GThreadSafeMainLoopSource m_activeTimerHandler;
     GThreadSafeMainLoopSource m_tagTimerHandler;
 
-    DeprecatedMutex m_tagMutex;
+    Mutex m_tagMutex;
     GRefPtr<GstTagList> m_tags;
 };
 
     GRefPtr<GstTagList> m_tags;
 };
 
index d972355..5125bb4 100644 (file)
@@ -84,14 +84,14 @@ bool DisplayRefreshMonitorMac::requestRefreshCallback()
         setIsActive(true);
     }
 
         setIsActive(true);
     }
 
-    DeprecatedMutexLocker lock(mutex());
+    MutexLocker lock(mutex());
     setIsScheduled(true);
     return true;
 }
 
 void DisplayRefreshMonitorMac::displayLinkFired(double nowSeconds, double outputTimeSeconds)
 {
     setIsScheduled(true);
     return true;
 }
 
 void DisplayRefreshMonitorMac::displayLinkFired(double nowSeconds, double outputTimeSeconds)
 {
-    DeprecatedMutexLocker lock(mutex());
+    MutexLocker lock(mutex());
     if (!isPreviousFrameDone())
         return;
 
     if (!isPreviousFrameDone())
         return;
 
index c3827bf..63e7c58 100644 (file)
@@ -512,21 +512,21 @@ void MediaPlayerPrivateMediaFoundation::destroyVideoWindow()
 
 void MediaPlayerPrivateMediaFoundation::addListener(MediaPlayerListener* listener)
 {
 
 void MediaPlayerPrivateMediaFoundation::addListener(MediaPlayerListener* listener)
 {
-    DeprecatedMutexLocker locker(m_mutexListeners);
+    MutexLocker locker(m_mutexListeners);
 
     m_listeners.add(listener);
 }
 
 void MediaPlayerPrivateMediaFoundation::removeListener(MediaPlayerListener* listener)
 {
 
     m_listeners.add(listener);
 }
 
 void MediaPlayerPrivateMediaFoundation::removeListener(MediaPlayerListener* listener)
 {
-    DeprecatedMutexLocker locker(m_mutexListeners);
+    MutexLocker locker(m_mutexListeners);
 
     m_listeners.remove(listener);
 }
 
 void MediaPlayerPrivateMediaFoundation::notifyDeleted()
 {
 
     m_listeners.remove(listener);
 }
 
 void MediaPlayerPrivateMediaFoundation::notifyDeleted()
 {
-    DeprecatedMutexLocker locker(m_mutexListeners);
+    MutexLocker locker(m_mutexListeners);
 
     for (HashSet<MediaPlayerListener*>::const_iterator it = m_listeners.begin(); it != m_listeners.end(); ++it)
         (*it)->onMediaPlayerDeleted();
 
     for (HashSet<MediaPlayerListener*>::const_iterator it = m_listeners.begin(); it != m_listeners.end(); ++it)
         (*it)->onMediaPlayerDeleted();
@@ -704,7 +704,7 @@ HRESULT STDMETHODCALLTYPE MediaPlayerPrivateMediaFoundation::AsyncCallback::GetP
 
 HRESULT STDMETHODCALLTYPE MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke(__RPC__in_opt IMFAsyncResult *pAsyncResult)
 {
 
 HRESULT STDMETHODCALLTYPE MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke(__RPC__in_opt IMFAsyncResult *pAsyncResult)
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     if (!m_mediaPlayer)
         return S_OK;
 
     if (!m_mediaPlayer)
         return S_OK;
@@ -719,7 +719,7 @@ HRESULT STDMETHODCALLTYPE MediaPlayerPrivateMediaFoundation::AsyncCallback::Invo
 
 void MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted()
 {
 
 void MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted()
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     m_mediaPlayer = nullptr;
 }
 
     m_mediaPlayer = nullptr;
 }
index 0aa73c5..729d630 100644 (file)
@@ -89,7 +89,7 @@ private:
 
     class MediaPlayerListener;
     HashSet<MediaPlayerListener*> m_listeners;
 
     class MediaPlayerListener;
     HashSet<MediaPlayerListener*> m_listeners;
-    DeprecatedMutex m_mutexListeners;
+    Mutex m_mutexListeners;
 
     COMPtr<IMFMediaSession> m_mediaSession;
     COMPtr<IMFSourceResolver> m_sourceResolver;
 
     COMPtr<IMFMediaSession> m_mediaSession;
     COMPtr<IMFSourceResolver> m_sourceResolver;
@@ -149,7 +149,7 @@ private:
         ULONG m_refCount;
         MediaPlayerPrivateMediaFoundation* m_mediaPlayer;
         bool m_event;
         ULONG m_refCount;
         MediaPlayerPrivateMediaFoundation* m_mediaPlayer;
         bool m_event;
-        DeprecatedMutex m_mutex;
+        Mutex m_mutex;
     };
 
 };
     };
 
 };
index d568225..44babcc 100644 (file)
@@ -211,9 +211,9 @@ private:
     float m_pendingScale;
     float m_pendingZoomedOutScale;
 
     float m_pendingScale;
     float m_pendingZoomedOutScale;
 
-    mutable DeprecatedMutex m_tileMutex;
-    mutable DeprecatedMutex m_savedDisplayRectMutex;
-    mutable DeprecatedMutex m_contentReplacementImageMutex;
+    mutable Mutex m_tileMutex;
+    mutable Mutex m_savedDisplayRectMutex;
+    mutable Mutex m_contentReplacementImageMutex;
 
     bool m_tileControllerShouldUseLowScaleTiles;
 };
 
     bool m_tileControllerShouldUseLowScaleTiles;
 };
index 8ac81ad..927e9a8 100644 (file)
@@ -147,7 +147,7 @@ void LegacyTileCache::setTilesOpaque(bool opaque)
     if (m_tilesOpaque == opaque)
         return;
 
     if (m_tilesOpaque == opaque)
         return;
 
-    DeprecatedMutexLocker locker(m_tileMutex);
+    MutexLocker locker(m_tileMutex);
 
     m_tilesOpaque = opaque;
     m_zoomedOutTileGrid->updateTileOpacity();
 
     m_tilesOpaque = opaque;
     m_zoomedOutTileGrid->updateTileOpacity();
@@ -160,7 +160,7 @@ void LegacyTileCache::doLayoutTiles()
     if (isTileCreationSuspended())
         return;
 
     if (isTileCreationSuspended())
         return;
 
-    DeprecatedMutexLocker locker(m_tileMutex);
+    MutexLocker locker(m_tileMutex);
     LegacyTileGrid* activeGrid = activeTileGrid();
     // Even though we aren't actually creating tiles in the inactive grid, we
     // still need to drop invalid tiles in response to a layout.
     LegacyTileGrid* activeGrid = activeTileGrid();
     // Even though we aren't actually creating tiles in the inactive grid, we
     // still need to drop invalid tiles in response to a layout.
@@ -200,7 +200,7 @@ void LegacyTileCache::setCurrentScale(float scale)
     if (!keepsZoomedOutTiles() && !isTileInvalidationSuspended()) {
         // Tile invalidation is normally suspended during zooming by UIKit but some applications
         // using custom scrollviews may zoom without triggering the callbacks. Invalidate the tiles explicitly.
     if (!keepsZoomedOutTiles() && !isTileInvalidationSuspended()) {
         // Tile invalidation is normally suspended during zooming by UIKit but some applications
         // using custom scrollviews may zoom without triggering the callbacks. Invalidate the tiles explicitly.
-        DeprecatedMutexLocker locker(m_tileMutex);
+        MutexLocker locker(m_tileMutex);
         activeTileGrid()->dropAllTiles();
         activeTileGrid()->createTiles(CoverVisibleOnly);
     }
         activeTileGrid()->dropAllTiles();
         activeTileGrid()->createTiles(CoverVisibleOnly);
     }
@@ -225,7 +225,7 @@ void LegacyTileCache::commitScaleChange()
     ASSERT(m_pendingZoomedOutScale || m_pendingScale);
     ASSERT(m_tilingMode != Disabled);
     
     ASSERT(m_pendingZoomedOutScale || m_pendingScale);
     ASSERT(m_tilingMode != Disabled);
     
-    DeprecatedMutexLocker locker(m_tileMutex);
+    MutexLocker locker(m_tileMutex);
 
     if (m_pendingZoomedOutScale) {
         m_zoomedOutTileGrid->setScale(m_pendingZoomedOutScale);
 
     if (m_pendingZoomedOutScale) {
         m_zoomedOutTileGrid->setScale(m_pendingZoomedOutScale);
@@ -314,7 +314,7 @@ void LegacyTileCache::layoutTilesNow()
     if (m_tilingMode == Zooming)
         m_tilingMode = Minimal;
 
     if (m_tilingMode == Zooming)
         m_tilingMode = Minimal;
 
-    DeprecatedMutexLocker locker(m_tileMutex);
+    MutexLocker locker(m_tileMutex);
     LegacyTileGrid* activeGrid = activeTileGrid();
     if (activeGrid->checkDoSingleTileLayout()) {
         m_tilingMode = savedTilingMode;
     LegacyTileGrid* activeGrid = activeTileGrid();
     if (activeGrid->checkDoSingleTileLayout()) {
         m_tilingMode = savedTilingMode;
@@ -327,14 +327,14 @@ void LegacyTileCache::layoutTilesNow()
 void LegacyTileCache::layoutTilesNowForRect(const IntRect& rect)
 {
     ASSERT(WebThreadIsLockedOrDisabled());
 void LegacyTileCache::layoutTilesNowForRect(const IntRect& rect)
 {
     ASSERT(WebThreadIsLockedOrDisabled());
-    DeprecatedMutexLocker locker(m_tileMutex);
+    MutexLocker locker(m_tileMutex);
 
     activeTileGrid()->addTilesCoveringRect(rect);
 }
 
 void LegacyTileCache::removeAllNonVisibleTiles()
 {
 
     activeTileGrid()->addTilesCoveringRect(rect);
 }
 
 void LegacyTileCache::removeAllNonVisibleTiles()
 {
-    DeprecatedMutexLocker locker(m_tileMutex);
+    MutexLocker locker(m_tileMutex);
     removeAllNonVisibleTilesInternal();
 }
 
     removeAllNonVisibleTilesInternal();
 }
 
@@ -356,7 +356,7 @@ void LegacyTileCache::removeAllNonVisibleTilesInternal()
 
 void LegacyTileCache::removeAllTiles()
 {
 
 void LegacyTileCache::removeAllTiles()
 {
-    DeprecatedMutexLocker locker(m_tileMutex);
+    MutexLocker locker(m_tileMutex);
     m_zoomedOutTileGrid->dropAllTiles();
     if (m_zoomedInTileGrid)
         m_zoomedInTileGrid->dropAllTiles();
     m_zoomedOutTileGrid->dropAllTiles();
     if (m_zoomedInTileGrid)
         m_zoomedInTileGrid->dropAllTiles();
@@ -364,7 +364,7 @@ void LegacyTileCache::removeAllTiles()
 
 void LegacyTileCache::removeForegroundTiles()
 {
 
 void LegacyTileCache::removeForegroundTiles()
 {
-    DeprecatedMutexLocker locker(m_tileMutex);
+    MutexLocker locker(m_tileMutex);
     if (!keepsZoomedOutTiles())
         m_zoomedOutTileGrid->dropAllTiles();
     if (m_zoomedInTileGrid)
     if (!keepsZoomedOutTiles())
         m_zoomedOutTileGrid->dropAllTiles();
     if (m_zoomedInTileGrid)
@@ -373,13 +373,13 @@ void LegacyTileCache::removeForegroundTiles()
 
 void LegacyTileCache::setContentReplacementImage(RetainPtr<CGImageRef> contentReplacementImage)
 {
 
 void LegacyTileCache::setContentReplacementImage(RetainPtr<CGImageRef> contentReplacementImage)
 {
-    DeprecatedMutexLocker locker(m_contentReplacementImageMutex);
+    MutexLocker locker(m_contentReplacementImageMutex);
     m_contentReplacementImage = contentReplacementImage;
 }
 
 RetainPtr<CGImageRef> LegacyTileCache::contentReplacementImage() const
 {
     m_contentReplacementImage = contentReplacementImage;
 }
 
 RetainPtr<CGImageRef> LegacyTileCache::contentReplacementImage() const
 {
-    DeprecatedMutexLocker locker(m_contentReplacementImageMutex);
+    MutexLocker locker(m_contentReplacementImageMutex);
     return m_contentReplacementImage;
 }
 
     return m_contentReplacementImage;
 }
 
@@ -426,7 +426,7 @@ void LegacyTileCache::tileCreationTimerFired()
 {
     if (isTileCreationSuspended())
         return;
 {
     if (isTileCreationSuspended())
         return;
-    DeprecatedMutexLocker locker(m_tileMutex);
+    MutexLocker locker(m_tileMutex);
     createTilesInActiveGrid(CoverSpeculative);
 }
 
     createTilesInActiveGrid(CoverSpeculative);
 }
 
@@ -620,7 +620,7 @@ void LegacyTileCache::scheduleLayerFlushForPendingRepaint()
 
 void LegacyTileCache::setNeedsDisplayInRect(const IntRect& dirtyRect)
 {
 
 void LegacyTileCache::setNeedsDisplayInRect(const IntRect& dirtyRect)
 {
-    DeprecatedMutexLocker locker(m_savedDisplayRectMutex);
+    MutexLocker locker(m_savedDisplayRectMutex);
     bool addedFirstRect = m_savedDisplayRects.isEmpty();
     m_savedDisplayRects.append(dirtyRect);
     if (!addedFirstRect)
     bool addedFirstRect = m_savedDisplayRects.isEmpty();
     m_savedDisplayRects.append(dirtyRect);
     if (!addedFirstRect)
@@ -692,7 +692,7 @@ void LegacyTileCache::updateTilingMode()
         if (m_tilingMode == Disabled)
             return;
 
         if (m_tilingMode == Disabled)
             return;
 
-        DeprecatedMutexLocker locker(m_tileMutex);
+        MutexLocker locker(m_tileMutex);
         createTilesInActiveGrid(CoverVisibleOnly);
 
         if (!m_savedDisplayRects.isEmpty())
         createTilesInActiveGrid(CoverVisibleOnly);
 
         if (!m_savedDisplayRects.isEmpty())
@@ -710,7 +710,7 @@ void LegacyTileCache::setTilingMode(TilingMode tilingMode)
     if ((m_pendingZoomedOutScale || m_pendingScale) && m_tilingMode != Disabled)
         commitScaleChange();
     else if (wasZooming) {
     if ((m_pendingZoomedOutScale || m_pendingScale) && m_tilingMode != Disabled)
         commitScaleChange();
     else if (wasZooming) {
-        DeprecatedMutexLocker locker(m_tileMutex);
+        MutexLocker locker(m_tileMutex);
         bringActiveTileGridToFront();
     }
 
         bringActiveTileGridToFront();
     }
 
@@ -753,7 +753,7 @@ void LegacyTileCache::doPendingRepaints()
         return;
     if (isTileInvalidationSuspended())
         return;
         return;
     if (isTileInvalidationSuspended())
         return;
-    DeprecatedMutexLocker locker(m_tileMutex);
+    MutexLocker locker(m_tileMutex);
     flushSavedDisplayRects();
 }
 
     flushSavedDisplayRects();
 }
 
@@ -764,7 +764,7 @@ void LegacyTileCache::flushSavedDisplayRects()
 
     Vector<IntRect> rects;
     {
 
     Vector<IntRect> rects;
     {
-        DeprecatedMutexLocker locker(m_savedDisplayRectMutex);
+        MutexLocker locker(m_savedDisplayRectMutex);
         m_savedDisplayRects.swap(rects);
     }
     size_t size = rects.size();
         m_savedDisplayRects.swap(rects);
     }
     size_t size = rects.size();
@@ -792,7 +792,7 @@ void LegacyTileCache::prepareToDraw()
     [[m_window contentView] viewWillDraw];
 
     if (!m_savedDisplayRects.isEmpty()) {
     [[m_window contentView] viewWillDraw];
 
     if (!m_savedDisplayRects.isEmpty()) {
-        DeprecatedMutexLocker locker(m_tileMutex);
+        MutexLocker locker(m_tileMutex);
         flushSavedDisplayRects();
     }
 }
         flushSavedDisplayRects();
     }
 }
index 91e1ea0..30fe6be 100644 (file)
@@ -75,7 +75,7 @@ private:
     Vector<IntSize> m_sizesInPruneOrder;
     unsigned m_totalBytes;
     unsigned m_capacity;
     Vector<IntSize> m_sizesInPruneOrder;
     unsigned m_totalBytes;
     unsigned m_capacity;
-    DeprecatedMutex m_layerPoolMutex;
+    Mutex m_layerPoolMutex;
 
     double m_lastAddTime;
     bool m_needsPrune;
 
     double m_lastAddTime;
     bool m_needsPrune;
index 4a7c8fa..dad4c83 100644 (file)
@@ -84,7 +84,7 @@ void LegacyTileLayerPool::addLayer(const RetainPtr<LegacyTileLayer>& layer)
         return;
     }
 
         return;
     }
 
-    DeprecatedMutexLocker locker(m_layerPoolMutex);
+    MutexLocker locker(m_layerPoolMutex);
     listOfLayersWithSize(layerSize).prepend(layer);
     m_totalBytes += bytesBackingLayerWithPixelSize(layerSize);
 
     listOfLayersWithSize(layerSize).prepend(layer);
     m_totalBytes += bytesBackingLayerWithPixelSize(layerSize);
 
@@ -96,7 +96,7 @@ RetainPtr<LegacyTileLayer> LegacyTileLayerPool::takeLayerWithSize(const IntSize&
 {
     if (!canReuseLayerWithSize(size))
         return nil;
 {
     if (!canReuseLayerWithSize(size))
         return nil;
-    DeprecatedMutexLocker locker(m_layerPoolMutex);
+    MutexLocker locker(m_layerPoolMutex);
     LayerList& reuseList = listOfLayersWithSize(size, MarkAsUsed);
     if (reuseList.isEmpty())
         return nil;
     LayerList& reuseList = listOfLayersWithSize(size, MarkAsUsed);
     if (reuseList.isEmpty())
         return nil;
@@ -106,7 +106,7 @@ RetainPtr<LegacyTileLayer> LegacyTileLayerPool::takeLayerWithSize(const IntSize&
 
 void LegacyTileLayerPool::setCapacity(unsigned capacity)
 {
 
 void LegacyTileLayerPool::setCapacity(unsigned capacity)
 {
-    DeprecatedMutexLocker reuseLocker(m_layerPoolMutex);
+    MutexLocker reuseLocker(m_layerPoolMutex);
     if (capacity < m_capacity)
         schedulePrune();
     m_capacity = capacity;
     if (capacity < m_capacity)
         schedulePrune();
     m_capacity = capacity;
@@ -136,7 +136,7 @@ void LegacyTileLayerPool::schedulePrune()
 
 void LegacyTileLayerPool::prune()
 {
 
 void LegacyTileLayerPool::prune()
 {
-    DeprecatedMutexLocker locker(m_layerPoolMutex);
+    MutexLocker locker(m_layerPoolMutex);
     ASSERT(m_needsPrune);
     m_needsPrune = false;
     unsigned shrinkTo = decayedCapacity();
     ASSERT(m_needsPrune);
     m_needsPrune = false;
     unsigned shrinkTo = decayedCapacity();
@@ -163,7 +163,7 @@ void LegacyTileLayerPool::prune()
 
 void LegacyTileLayerPool::drain()
 {
 
 void LegacyTileLayerPool::drain()
 {
-    DeprecatedMutexLocker reuseLocker(m_layerPoolMutex);
+    MutexLocker reuseLocker(m_layerPoolMutex);
     m_reuseLists.clear();
     m_sizesInPruneOrder.clear();
     m_totalBytes = 0;
     m_reuseLists.clear();
     m_sizesInPruneOrder.clear();
     m_totalBytes = 0;
index 6d5b6bd..e4d9f62 100644 (file)
@@ -60,7 +60,7 @@ CurlDownloadManager::~CurlDownloadManager()
 
 bool CurlDownloadManager::add(CURL* curlHandle)
 {
 
 bool CurlDownloadManager::add(CURL* curlHandle)
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     m_pendingHandleList.append(curlHandle);
     startThreadIfNeeded();
 
     m_pendingHandleList.append(curlHandle);
     startThreadIfNeeded();
@@ -70,7 +70,7 @@ bool CurlDownloadManager::add(CURL* curlHandle)
 
 bool CurlDownloadManager::remove(CURL* curlHandle)
 {
 
 bool CurlDownloadManager::remove(CURL* curlHandle)
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     m_removedHandleList.append(curlHandle);
 
 
     m_removedHandleList.append(curlHandle);
 
@@ -79,13 +79,13 @@ bool CurlDownloadManager::remove(CURL* curlHandle)
 
 int CurlDownloadManager::getActiveDownloadCount() const
 {
 
 int CurlDownloadManager::getActiveDownloadCount() const
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
     return m_activeHandleList.size();
 }
 
 int CurlDownloadManager::getPendingDownloadCount() const
 {
     return m_activeHandleList.size();
 }
 
 int CurlDownloadManager::getPendingDownloadCount() const
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
     return m_pendingHandleList.size();
 }
 
     return m_pendingHandleList.size();
 }
 
@@ -111,7 +111,7 @@ void CurlDownloadManager::stopThread()
 
 void CurlDownloadManager::stopThreadIfIdle()
 {
 
 void CurlDownloadManager::stopThreadIfIdle()
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     if (!getActiveDownloadCount() && !getPendingDownloadCount())
         setRunThread(false);
 
     if (!getActiveDownloadCount() && !getPendingDownloadCount())
         setRunThread(false);
@@ -119,7 +119,7 @@ void CurlDownloadManager::stopThreadIfIdle()
 
 void CurlDownloadManager::updateHandleList()
 {
 
 void CurlDownloadManager::updateHandleList()
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     // Remove curl easy handles from multi list 
     int size = m_removedHandleList.size();
 
     // Remove curl easy handles from multi list 
     int size = m_removedHandleList.size();
@@ -245,7 +245,7 @@ CurlDownload::CurlDownload()
 
 CurlDownload::~CurlDownload()
 {
 
 CurlDownload::~CurlDownload()
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     if (m_url)
         fastFree(m_url);
 
     if (m_url)
         fastFree(m_url);
@@ -262,7 +262,7 @@ void CurlDownload::init(CurlDownloadListener* listener, const URL& url)
     if (!listener)
         return;
 
     if (!listener)
         return;
 
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     m_curlHandle = curl_easy_init();
 
 
     m_curlHandle = curl_easy_init();
 
@@ -295,7 +295,7 @@ void CurlDownload::init(CurlDownloadListener* listener, ResourceHandle*, const R
     if (!listener)
         return;
 
     if (!listener)
         return;
 
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     URL url(ParsedURLString, request.url());
 
 
     URL url(ParsedURLString, request.url());
 
@@ -317,25 +317,25 @@ bool CurlDownload::cancel()
 
 String CurlDownload::getTempPath() const
 {
 
 String CurlDownload::getTempPath() const
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
     return m_tempPath;
 }
 
 String CurlDownload::getUrl() const
 {
     return m_tempPath;
 }
 
 String CurlDownload::getUrl() const
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
     return String(m_url);
 }
 
 ResourceResponse CurlDownload::getResponse() const
 {
     return String(m_url);
 }
 
 ResourceResponse CurlDownload::getResponse() const
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
     return m_response;
 }
 
 void CurlDownload::closeFile()
 {
     return m_response;
 }
 
 void CurlDownload::closeFile()
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     if (m_tempHandle != invalidPlatformFileHandle) {
         WebCore::closeFile(m_tempHandle);
 
     if (m_tempHandle != invalidPlatformFileHandle) {
         WebCore::closeFile(m_tempHandle);
@@ -390,7 +390,7 @@ void CurlDownload::addHeaders(const ResourceRequest& request)
 
 void CurlDownload::didReceiveHeader(const String& header)
 {
 
 void CurlDownload::didReceiveHeader(const String& header)
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     if (header == "\r\n" || header == "\n") {
 
 
     if (header == "\r\n" || header == "\n") {
 
@@ -430,7 +430,7 @@ void CurlDownload::didReceiveHeader(const String& header)
 
 void CurlDownload::didReceiveData(void* data, int size)
 {
 
 void CurlDownload::didReceiveData(void* data, int size)
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     RefPtr<CurlDownload> protectedDownload(this);
 
 
     RefPtr<CurlDownload> protectedDownload(this);
 
@@ -464,7 +464,7 @@ void CurlDownload::didFinish()
 
 void CurlDownload::didFail()
 {
 
 void CurlDownload::didFail()
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     closeFile();
 
 
     closeFile();
 
index 493ac27..64ba8a5 100644 (file)
@@ -73,7 +73,7 @@ private:
     Vector<CURL*> m_pendingHandleList;
     Vector<CURL*> m_activeHandleList;
     Vector<CURL*> m_removedHandleList;
     Vector<CURL*> m_pendingHandleList;
     Vector<CURL*> m_activeHandleList;
     Vector<CURL*> m_removedHandleList;
-    mutable DeprecatedMutex m_mutex;
+    mutable Mutex m_mutex;
     bool m_runThread;
 };
 
     bool m_runThread;
 };
 
@@ -140,7 +140,7 @@ private:
     WebCore::PlatformFileHandle m_tempHandle;
     WebCore::ResourceResponse m_response;
     bool m_deletesFileUponFailure;
     WebCore::PlatformFileHandle m_tempHandle;
     WebCore::ResourceResponse m_response;
     bool m_deletesFileUponFailure;
-    mutable DeprecatedMutex m_mutex;
+    mutable Mutex