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.
index dc2317e..12dbf24 100644 (file)
@@ -285,7 +285,7 @@ void SamplingTool::doRun()
 
 #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());
@@ -301,7 +301,7 @@ void SamplingTool::sample()
 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);
index 6a47ba8..44714c6 100644 (file)
@@ -338,7 +338,7 @@ namespace JSC {
         unsigned m_opcodeSamplesInCTIFunctions[numOpcodeIDs];
         
 #if ENABLE(CODEBLOCK_SAMPLING)
-        DeprecatedMutex m_scriptSampleMapMutex;
+        Mutex m_scriptSampleMapMutex;
         std::unique_ptr<ScriptSampleRecordMap> m_scopeSampleMap;
 #endif
     };
index 36385e2..e9fc565 100644 (file)
@@ -48,7 +48,7 @@ private:
     
     Worklist* m_worklist;
     ThreadIdentifier m_identifier;
-    DeprecatedMutex m_rightToRun;
+    Mutex m_rightToRun;
     Safepoint* m_safepoint;
 };
 
index 32265e7..4a8f572 100644 (file)
@@ -46,7 +46,7 @@ Worklist::Worklist(CString worklistName)
 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();
@@ -77,7 +77,7 @@ Ref<Worklist> Worklist::create(CString worklistName, unsigned numberOfThreads, i
 
 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)
@@ -89,7 +89,7 @@ bool Worklist::isActiveForVM(VM& vm) const
 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");
@@ -102,7 +102,7 @@ void Worklist::enqueue(PassRefPtr<Plan> passedPlan)
 
 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;
@@ -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.
     
-    DeprecatedMutexLocker locker(m_lock);
+    MutexLocker locker(m_lock);
     
     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);
-    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)
@@ -192,7 +192,7 @@ Worklist::State Worklist::completeAllReadyPlansForVM(VM& vm, CompilationKey requ
     }
     
     if (!!requestedKey && resultingState == NotKnown) {
-        DeprecatedMutexLocker locker(m_lock);
+        MutexLocker locker(m_lock);
         if (m_plans.contains(requestedKey))
             resultingState = Compiling;
     }
@@ -225,7 +225,7 @@ void Worklist::visitWeakReferences(SlotVisitor& visitor, CodeBlockSet& codeBlock
 {
     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)
@@ -248,7 +248,7 @@ void Worklist::visitWeakReferences(SlotVisitor& visitor, CodeBlockSet& codeBlock
 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();
@@ -295,17 +295,17 @@ void Worklist::removeDeadPlans(VM& vm)
 
 size_t Worklist::queueLength()
 {
-    DeprecatedMutexLocker locker(m_lock);
+    MutexLocker locker(m_lock);
     return m_queue.size();
 }
 
 void Worklist::dump(PrintStream& out) const
 {
-    DeprecatedMutexLocker locker(m_lock);
+    MutexLocker locker(m_lock);
     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(),
@@ -325,7 +325,7 @@ void Worklist::runThread(ThreadData* data)
     for (;;) {
         RefPtr<Plan> plan;
         {
-            DeprecatedMutexLocker locker(m_lock);
+            MutexLocker locker(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;
@@ -359,7 +359,7 @@ void Worklist::runThread(ThreadData* data)
             RELEASE_ASSERT(!plan->vm.heap.isCollecting());
             
             {
-                DeprecatedMutexLocker locker(m_lock);
+                MutexLocker locker(m_lock);
                 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.
index 59e4f25..bd6e6fa 100644 (file)
@@ -85,7 +85,7 @@ private:
     
     void removeAllReadyPlansForVM(VM&, Vector<RefPtr<Plan>, 8>&);
 
-    void dump(const DeprecatedMutexLocker&, PrintStream&) const;
+    void dump(const MutexLocker&, PrintStream&) const;
     
     CString m_threadName;
     
@@ -103,9 +103,9 @@ private:
     // 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;
     
index e11ad51..8f35742 100644 (file)
@@ -78,14 +78,14 @@ public:
     
     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()
     {
-        DeprecatedMutexLocker locker(m_lock);
+        MutexLocker locker(m_lock);
         while (!m_queue.isEmpty() || m_working)
             m_condition.wait(m_lock);
     }
@@ -96,7 +96,7 @@ private:
         for (;;) {
             std::unique_ptr<DisassemblyTask> task;
             {
-                DeprecatedMutexLocker locker(m_lock);
+                MutexLocker locker(m_lock);
                 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 };
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--;
@@ -231,7 +231,7 @@ void CopiedSpace::didStartFullCollection()
 void CopiedSpace::doneCopying()
 {
     {
-        DeprecatedMutexLocker locker(m_loanedBlocksLock);
+        MutexLocker locker(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;
 
-    DeprecatedMutex m_loanedBlocksLock; 
+    Mutex m_loanedBlocksLock; 
     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);
 
     {
-        DeprecatedMutexLocker locker(m_loanedBlocksLock);
+        MutexLocker locker(m_loanedBlocksLock);
         ASSERT(m_numberOfLoanedBlocks > 0);
         ASSERT(m_inCopyingPhase);
         m_numberOfLoanedBlocks--;
@@ -128,7 +128,7 @@ inline CopiedBlock* CopiedSpace::allocateBlockForCopyingPhase()
     CopiedBlock* block = CopiedBlock::createNoZeroFill();
 
     {
-        DeprecatedMutexLocker locker(m_loanedBlocksLock);
+        MutexLocker locker(m_loanedBlocksLock);
         m_numberOfLoanedBlocks++;
     }
 
index b2c7433..1efbb9a 100644 (file)
@@ -59,7 +59,7 @@ protected:
     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);
index a694508..4ae16a9 100644 (file)
@@ -103,18 +103,18 @@ public:
         }
 
     private:
-        DeprecatedMutexLocker m_locker;
+        MutexLocker m_locker;
     };
 
     void add(MachineThreads* machineThreads)
     {
-        DeprecatedMutexLocker managerLock(m_lock);
+        MutexLocker managerLock(m_lock);
         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);
     }
@@ -129,7 +129,7 @@ private:
 
     ActiveMachineThreadsManager() { }
     
-    DeprecatedMutex m_lock;
+    Mutex m_lock;
     MachineThreadsSet m_set;
 
     friend ActiveMachineThreadsManager& activeMachineThreadsManager();
@@ -263,7 +263,7 @@ MachineThreads::~MachineThreads()
     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;
@@ -294,7 +294,7 @@ void MachineThreads::addCurrentThread()
     threadSpecificSet(m_threadSpecific, this);
     Thread* thread = Thread::createForCurrentThread();
 
-    DeprecatedMutexLocker lock(m_registeredThreadsMutex);
+    MutexLocker lock(m_registeredThreadsMutex);
 
     thread->next = m_registeredThreads;
     m_registeredThreads = thread;
@@ -318,7 +318,7 @@ void MachineThreads::removeThread(void* p)
 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;
@@ -564,7 +564,7 @@ void MachineThreads::tryCopyOtherThreadStack(Thread* thread, void* buffer, size_
     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>.
@@ -658,7 +658,7 @@ void MachineThreads::gatherConservativeRoots(ConservativeRoots& conservativeRoot
     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);
 
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*);
-        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);
 
-        DeprecatedMutex m_registeredThreadsMutex;
+        Mutex m_registeredThreadsMutex;
         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;
 
-static DeprecatedMutex& stackStatisticsMutex()
+static Mutex& stackStatisticsMutex()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, staticMutex, ());
+    DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, staticMutex, ());
     return staticMutex;
 }    
 #endif // !ENABLE(JIT)
@@ -146,7 +146,7 @@ void JSStack::initializeThreading()
 
 void JSStack::addToCommittedByteCount(long byteCount)
 {
-    DeprecatedMutexLocker locker(stackStatisticsMutex());
+    MutexLocker locker(stackStatisticsMutex());
     ASSERT(static_cast<long>(committedBytesCount) + byteCount > -1);
     committedBytesCount += byteCount;
 }
@@ -176,7 +176,7 @@ Register* JSStack::highAddress() const
 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
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.
-    typedef DeprecatedMutex Lock;
-    typedef DeprecatedMutexLocker Locker;
+    typedef Mutex Lock;
+    typedef MutexLocker Locker;
 
     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.
-    typedef DeprecatedMutex Lock;
-    typedef DeprecatedMutexLocker Locker;
+    typedef Mutex Lock;
+    typedef MutexLocker Locker;
     
 
     void addDatabaseToAtExit();
index fb37292..721faa1 100644 (file)
@@ -1,5 +1,110 @@
 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:
index b1f7624..037ce3f 100644 (file)
 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)
 {
-    DeprecatedMutex& mutex = getSwapLock(addend);
+    Mutex& mutex = getSwapLock(addend);
 
     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:
-        mutable DeprecatedMutex m_mutex;
+        mutable Mutex m_mutex;
         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)
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         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)
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         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)
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         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)
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         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>
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         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>
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         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>
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         if (m_queue.isEmpty())
             return nullptr;
 
@@ -197,7 +197,7 @@ namespace WTF {
     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);
@@ -214,7 +214,7 @@ namespace WTF {
     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();
@@ -223,7 +223,7 @@ namespace WTF {
     template<typename DataType>
     inline void MessageQueue<DataType>::kill()
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         m_killed = true;
         m_condition.broadcast();
     }
@@ -231,7 +231,7 @@ namespace WTF {
     template<typename DataType>
     inline bool MessageQueue<DataType>::killed() const
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         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)
 {
-    DeprecatedMutexLocker lock(m_mutex);
+    MutexLocker lock(m_mutex);
 
     m_threadFunction = threadFunction;
     m_parameters = parameters;
@@ -115,7 +115,7 @@ void ParallelEnvironment::ThreadPrivate::execute(ThreadFunction threadFunction,
 
 void ParallelEnvironment::ThreadPrivate::waitForFinish()
 {
-    DeprecatedMutexLocker lock(m_mutex);
+    MutexLocker lock(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);
-    DeprecatedMutexLocker lock(sharedThread->m_mutex);
+    MutexLocker lock(sharedThread->m_mutex);
 
     while (sharedThread->m_threadID) {
         if (sharedThread->m_running) {
index 3462630..731b960 100644 (file)
@@ -76,7 +76,7 @@ public:
         bool m_running;
         ParallelEnvironment* m_parent;
 
-        mutable DeprecatedMutex m_mutex;
+        mutable Mutex m_mutex;
         ThreadCondition m_threadCondition;
 
         ThreadFunction m_threadFunction;
index ebeab75..60e26ee 100644 (file)
@@ -92,7 +92,7 @@ void RunLoop::performWork()
     {
         std::function<void()> function;
         {
-            DeprecatedMutexLocker locker(m_functionQueueLock);
+            MutexLocker locker(m_functionQueueLock);
             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;
         {
-            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().
@@ -125,7 +125,7 @@ void RunLoop::performWork()
 void RunLoop::dispatch(std::function<void ()> function)
 {
     {
-        DeprecatedMutexLocker locker(m_functionQueueLock);
+        MutexLocker locker(m_functionQueueLock);
         m_functionQueue.append(WTF::move(function));
     }
 
index 05ad6e3..6f30236 100644 (file)
@@ -130,7 +130,7 @@ private:
 
     void performWork();
 
-    DeprecatedMutex m_functionQueueLock;
+    Mutex m_functionQueueLock;
     Deque<std::function<void ()>> m_functionQueue;
 
 #if PLATFORM(WIN)
@@ -147,10 +147,10 @@ private:
     RetainPtr<CFRunLoopSourceRef> m_runLoopSource;
     int m_nestingLevel;
 #elif PLATFORM(EFL)
-    DeprecatedMutex m_pipeLock;
+    Mutex m_pipeLock;
     EflUniquePtr<Ecore_Pipe> m_pipe;
 
-    DeprecatedMutex m_wakeUpEventRequestedLock;
+    Mutex m_wakeUpEventRequestedLock;
     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;
 }
 
-static DeprecatedMutex& destructorsMutex()
+static Mutex& destructorsMutex()
 {
-    static DeprecatedMutex staticMutex;
+    static Mutex 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);
 
-    DeprecatedMutexLocker locker(destructorsMutex());
+    MutexLocker locker(destructorsMutex());
     destructorsList().push(*key);
 }
 
 void threadSpecificKeyDelete(ThreadSpecificKey key)
 {
-    DeprecatedMutexLocker locker(destructorsMutex());
+    MutexLocker locker(destructorsMutex());
     destructorsList().remove(key);
     key->~PlatformThreadSpecificKey();
     ::free(key);
@@ -126,7 +126,7 @@ void ThreadSpecificThreadExit()
             data->destructor(data);
     }
 
-    DeprecatedMutexLocker locker(destructorsMutex());
+    MutexLocker locker(destructorsMutex());
     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;
-    DeprecatedMutex creationMutex;
+    Mutex creationMutex;
 };
 
 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.
     {
-        DeprecatedMutexLocker locker(context->creationMutex);
+        MutexLocker locker(context->creationMutex);
     }
 
     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.
-    DeprecatedMutexLocker locker(context->creationMutex);
+    MutexLocker locker(context->creationMutex);
 
     return createThreadInternal(threadEntryPoint, context, name);
 }
index 236f010..4229231 100644 (file)
@@ -70,11 +70,11 @@ typedef void* PlatformMutex;
 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:
-    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();
@@ -86,7 +86,7 @@ private:
     PlatformMutex m_mutex;
 };
 
-typedef Locker<DeprecatedMutex> DeprecatedMutexLocker;
+typedef Locker<Mutex> MutexLocker;
 
 class ThreadCondition {
     WTF_MAKE_NONCOPYABLE(ThreadCondition);
@@ -94,10 +94,10 @@ public:
     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().
-    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();
     
@@ -113,8 +113,8 @@ WTF_EXPORT_PRIVATE DWORD absoluteTimeToWaitTimeoutInterval(double absoluteTime);
 
 } // namespace WTF
 
-using WTF::DeprecatedMutex;
-using WTF::DeprecatedMutexLocker;
+using WTF::Mutex;
+using WTF::MutexLocker;
 using WTF::ThreadCondition;
 
 #if OS(WINDOWS)
index a1ae181..106ed96 100644 (file)
@@ -102,9 +102,9 @@ void unsafeThreadWasDetached(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;
 }
 
@@ -126,7 +126,7 @@ void initializeThreading()
     ThreadIdentifierData::initializeOnce();
     StackStats::initialize();
     wtfThreadData();
-    s_dtoaP5Mutex = new DeprecatedMutex;
+    s_dtoaP5Mutex = new Mutex;
     initializeDates();
 }
 
@@ -138,7 +138,7 @@ static ThreadMap& threadMap()
 
 static ThreadIdentifier identifierByPthreadHandle(const pthread_t& pthreadHandle)
 {
-    DeprecatedMutexLocker locker(threadMapMutex());
+    MutexLocker locker(threadMapMutex());
 
     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));
-    DeprecatedMutexLocker locker(threadMapMutex());
+    MutexLocker locker(threadMapMutex());
     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);
 
     {
-        DeprecatedMutexLocker locker(threadMapMutex());
+        MutexLocker locker(threadMapMutex());
         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.
-        DeprecatedMutexLocker locker(threadMapMutex());
+        MutexLocker locker(threadMapMutex());
         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);
 
-    DeprecatedMutexLocker locker(threadMapMutex());
+    MutexLocker locker(threadMapMutex());
     PthreadState* state = threadMap().get(threadID);
     ASSERT(state);
     ASSERT(state->joinableState() == PthreadState::Joinable);
@@ -273,7 +273,7 @@ void detachThread(ThreadIdentifier threadID)
 {
     ASSERT(threadID);
 
-    DeprecatedMutexLocker locker(threadMapMutex());
+    MutexLocker locker(threadMapMutex());
     pthread_t pthreadHandle = pthreadHandleForIdentifierWithLockAlreadyHeld(threadID);
     ASSERT(pthreadHandle);
 
@@ -291,7 +291,7 @@ void detachThread(ThreadIdentifier threadID)
 
 void threadDidExit(ThreadIdentifier threadID)
 {
-    DeprecatedMutexLocker locker(threadMapMutex());
+    MutexLocker locker(threadMapMutex());
     PthreadState* state = threadMap().get(threadID);
     ASSERT(state);
     
@@ -313,7 +313,7 @@ ThreadIdentifier currentThread()
     return id;
 }
 
-DeprecatedMutex::DeprecatedMutex()
+Mutex::Mutex()
 {
     pthread_mutexattr_t attr;
     pthread_mutexattr_init(&attr);
@@ -325,19 +325,19 @@ DeprecatedMutex::DeprecatedMutex()
     pthread_mutexattr_destroy(&attr);
 }
 
-DeprecatedMutex::~DeprecatedMutex()
+Mutex::~Mutex()
 {
     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);
 }
 
-bool DeprecatedMutex::tryLock()
+bool Mutex::tryLock()
 {
     int result = pthread_mutex_trylock(&m_mutex);
 
@@ -350,7 +350,7 @@ bool DeprecatedMutex::tryLock()
     return false;
 }
 
-void DeprecatedMutex::unlock()
+void Mutex::unlock()
 {
     int result = pthread_mutex_unlock(&m_mutex);
     ASSERT_UNUSED(result, !result);
@@ -366,13 +366,13 @@ ThreadCondition::~ThreadCondition()
     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);
 }
 
-bool ThreadCondition::timedWait(DeprecatedMutex& mutex, double absoluteTime)
+bool ThreadCondition::timedWait(Mutex& mutex, double absoluteTime)
 {
     if (absoluteTime < currentTime())
         return false;
index e760516..ea4bd43 100644 (file)
@@ -143,9 +143,9 @@ void initializeCurrentThreadInternal(const char* szThreadName)
 #endif
 }
 
-static DeprecatedMutex& threadMapMutex()
+static Mutex& threadMapMutex()
 {
-    static DeprecatedMutex mutex;
+    static Mutex mutex;
     return mutex;
 }
 
@@ -165,7 +165,7 @@ void initializeThreading()
     threadMapMutex();
     initializeRandomNumberGenerator();
     wtfThreadData();
-    s_dtoaP5Mutex = new DeprecatedMutex;
+    s_dtoaP5Mutex = new Mutex;
     initializeDates();
 }
 
@@ -177,20 +177,20 @@ static HashMap<DWORD, HANDLE>& threadMap()
 
 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)
 {
-    DeprecatedMutexLocker locker(threadMapMutex());
+    MutexLocker locker(threadMapMutex());
     return threadMap().get(id);
 }
 
 static void clearThreadHandleForIdentifier(ThreadIdentifier id)
 {
-    DeprecatedMutexLocker locker(threadMapMutex());
+    MutexLocker locker(threadMapMutex());
     ASSERT(threadMap().contains(id));
     threadMap().remove(id);
 }
@@ -277,25 +277,25 @@ ThreadIdentifier currentThread()
     return static_cast<ThreadIdentifier>(GetCurrentThreadId());
 }
 
-DeprecatedMutex::DeprecatedMutex()
+Mutex::Mutex()
 {
     m_mutex.m_recursionCount = 0;
     InitializeCriticalSection(&m_mutex.m_internalMutex);
 }
 
-DeprecatedMutex::~DeprecatedMutex()
+Mutex::~Mutex()
 {
     DeleteCriticalSection(&m_mutex.m_internalMutex);
 }
 
-void DeprecatedMutex::lock()
+void Mutex::lock()
 {
     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
@@ -321,7 +321,7 @@ bool DeprecatedMutex::tryLock()
     return false;
 }
 
-void DeprecatedMutex::unlock()
+void Mutex::unlock()
 {
     ASSERT(m_mutex.m_recursionCount);
     --m_mutex.m_recursionCount;
@@ -458,12 +458,12 @@ ThreadCondition::~ThreadCondition()
     CloseHandle(m_condition.m_unblockLock);
 }
 
-void ThreadCondition::wait(DeprecatedMutex& mutex)
+void ThreadCondition::wait(Mutex& mutex)
 {
     m_condition.timedWait(mutex.impl(), INFINITE);
 }
 
-bool ThreadCondition::timedWait(DeprecatedMutex& mutex, double absoluteTime)
+bool ThreadCondition::timedWait(Mutex& mutex, double absoluteTime)
 {
     DWORD interval = absoluteTimeToWaitTimeoutInterval(absoluteTime);
 
index bed9214..6851c09 100644 (file)
@@ -113,10 +113,10 @@ private:
 #elif OS(WINDOWS)
     volatile LONG m_isWorkThreadRegistered;
 
-    DeprecatedMutex m_workItemQueueLock;
+    Mutex m_workItemQueueLock;
     Vector<RefPtr<WorkItemWin>> m_workItemQueue;
 
-    DeprecatedMutex m_handlesLock;
+    Mutex m_handlesLock;
     HashMap<HANDLE, RefPtr<HandleWorkItem>> m_handles;
 
     HANDLE m_timerQueue;
index 05fddfc..48de25b 100644 (file)
@@ -54,7 +54,7 @@
 
 namespace WTF {
 
-DeprecatedMutex* s_dtoaP5Mutex;
+Mutex* s_dtoaP5Mutex;
 
 typedef union {
     double d;
index e8f185f..fab840e 100644 (file)
@@ -28,9 +28,9 @@
 
 namespace WTF {
 
-class DeprecatedMutex;
+class Mutex;
 
-extern DeprecatedMutex* s_dtoaP5Mutex;
+extern Mutex* s_dtoaP5Mutex;
 
 typedef char DtoaBuffer[80];
 
index 83e2b75..4547ac2 100644 (file)
@@ -95,7 +95,7 @@ DispatchQueue::~DispatchQueue()
 void DispatchQueue::dispatch(std::unique_ptr<WorkItem> item)
 {
     {
-        DeprecatedMutexLocker locker(m_workItemsLock);
+        MutexLocker locker(m_workItemsLock);
         m_workItems.append(WTF::move(item));
     }
 
@@ -146,7 +146,7 @@ void DispatchQueue::performWork()
         Vector<std::unique_ptr<WorkItem>> workItems;
 
         {
-            DeprecatedMutexLocker locker(m_workItemsLock);
+            MutexLocker locker(m_workItemsLock);
             if (m_workItems.isEmpty())
                 return;
 
@@ -164,7 +164,7 @@ void DispatchQueue::performTimerWork()
 
     {
         // Protects m_timerWorkItems.
-        DeprecatedMutexLocker locker(m_timerWorkItemsLock);
+        MutexLocker locker(m_timerWorkItemsLock);
         if (m_timerWorkItems.isEmpty())
             return;
 
@@ -209,7 +209,7 @@ void DispatchQueue::insertTimerWorkItem(std::unique_ptr<TimerWorkItem> item)
 
     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())
@@ -229,14 +229,14 @@ void DispatchQueue::dispatchQueueThread()
 
 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
 {
-    DeprecatedMutexLocker locker(m_timerWorkItemsLock);
+    MutexLocker locker(m_timerWorkItemsLock);
     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;
-    DeprecatedMutex m_writeToPipeDescriptorLock;
+    Mutex m_writeToPipeDescriptorLock;
 
     bool m_isThreadRunning;
 
@@ -71,10 +71,10 @@ private:
     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;
-    mutable DeprecatedMutex m_timerWorkItemsLock;
+    mutable Mutex m_timerWorkItemsLock;
 };
 
 #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);
 
     {
-        DeprecatedMutexLocker locker(loop->m_wakeUpEventRequestedLock);
+        MutexLocker locker(loop->m_wakeUpEventRequestedLock);
         loop->m_wakeUpEventRequested = false;
     }
 
@@ -69,14 +69,14 @@ void RunLoop::wakeUpEvent(void* data, void*, unsigned)
 void RunLoop::wakeUp()
 {
     {
-        DeprecatedMutexLocker locker(m_wakeUpEventRequestedLock);
+        MutexLocker locker(m_wakeUpEventRequestedLock);
         if (m_wakeUpEventRequested)
             return;
         m_wakeUpEventRequested = true;
     }
 
     {
-        DeprecatedMutexLocker locker(m_pipeLock);
+        MutexLocker locker(m_pipeLock);
         ecore_pipe_write(m_pipe.get(), wakupEcorePipeMessage, ecorePipeMessageSize);
     }
 }
index 2435123..b7019da 100644 (file)
@@ -39,7 +39,7 @@ BinarySemaphore::~BinarySemaphore()
 
 void BinarySemaphore::signal()
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     m_isSet = true;
     m_condition.signal();
@@ -47,7 +47,7 @@ void BinarySemaphore::signal()
 
 bool BinarySemaphore::wait(double absoluteTime)
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     bool timedOut = false;
     while (!m_isSet) {
index ab667fe..b5db5d7 100644 (file)
@@ -44,7 +44,7 @@ public:
 private:
     bool m_isSet;
 
-    DeprecatedMutex m_mutex;
+    Mutex m_mutex;
     ThreadCondition m_condition;
 };
 
index 0da00fe..aee15fd 100644 (file)
@@ -41,7 +41,7 @@ void WorkQueue::handleCallback(void* context, BOOLEAN timerOrWaitFired)
     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.
@@ -120,7 +120,7 @@ void WorkQueue::unregisterAsWorkThread()
 void WorkQueue::platformInvalidate()
 {
 #if !ASSERT_DISABLED
-    DeprecatedMutexLocker lock(m_handlesLock);
+    MutexLocker lock(m_handlesLock);
     ASSERT(m_handles.isEmpty());
 #endif
 
@@ -131,7 +131,7 @@ void WorkQueue::platformInvalidate()
 
 void WorkQueue::dispatch(std::function<void()> function)
 {
-    DeprecatedMutexLocker locker(m_workItemQueueLock);
+    MutexLocker locker(m_workItemQueueLock);
     ref();
     m_workItemQueue.append(WorkItemWin::create(function, this));
 
@@ -150,7 +150,7 @@ struct TimerContext : public ThreadSafeRefCounted<TimerContext> {
 
     WorkQueue* queue;
     std::function<void()> function;
-    DeprecatedMutex timerMutex;
+    Mutex timerMutex;
     HANDLE timer;
 
 private:
@@ -171,7 +171,7 @@ void WorkQueue::timerCallback(void* context, BOOLEAN timerOrWaitFired)
 
     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)) {
@@ -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.
-        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.
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
index 47b66e3..b467d18 100644 (file)
@@ -38,7 +38,7 @@ namespace WebCore {
 AsyncAudioDecoder::AsyncAudioDecoder()
 {
     // Start worker thread.
-    DeprecatedMutexLocker lock(m_threadCreationMutex);
+    MutexLocker lock(m_threadCreationMutex);
     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.
-        DeprecatedMutexLocker lock(m_threadCreationMutex);
+        MutexLocker lock(m_threadCreationMutex);
     }
 
     // Keep running decoding tasks until we're killed.
index ee2214c..5e40cd2 100644 (file)
@@ -81,7 +81,7 @@ private:
     void runLoop();
 
     WTF::ThreadIdentifier m_threadID;
-    DeprecatedMutex m_threadCreationMutex;
+    Mutex m_threadCreationMutex;
     MessageQueue<DecodingTask> m_queue;
 };
 
index 64cba2c..f7d56e9 100644 (file)
@@ -380,7 +380,7 @@ private:
     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
 
index a3ecd90..b6e26e7 100644 (file)
@@ -63,13 +63,13 @@ const RealtimeMediaSourceStates& MediaStreamAudioSource::states()
 
 void MediaStreamAudioSource::addAudioConsumer(PassRefPtr<AudioDestinationConsumer> consumer)
 {
-    DeprecatedMutexLocker locker(m_audioConsumersLock);
+    MutexLocker locker(m_audioConsumersLock);
     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);
@@ -80,14 +80,14 @@ bool MediaStreamAudioSource::removeAudioConsumer(AudioDestinationConsumer* consu
 
 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)
 {
-    DeprecatedMutexLocker locker(m_audioConsumersLock);
+    MutexLocker locker(m_audioConsumersLock);
     for (auto& consumer : m_audioConsumers)
         consumer->consumeAudio(bus, numberOfFrames);
 }
index d611c8e..418b32e 100644 (file)
@@ -65,7 +65,7 @@ private:
     MediaStreamAudioSource();
 
     String m_deviceId;
-    DeprecatedMutex m_audioConsumersLock;
+    Mutex m_audioConsumersLock;
     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());
 
     {
-        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
@@ -507,7 +507,7 @@ void Database::scheduleTransaction()
 
 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;
 
@@ -535,14 +535,14 @@ void Database::scheduleTransactionStep(SQLTransactionBackend* transaction)
 
 void Database::inProgressTransactionCompleted()
 {
-    DeprecatedMutexLocker locker(m_transactionInProgressMutex);
+    MutexLocker locker(m_transactionInProgressMutex);
     m_transactionInProgress = false;
     scheduleTransaction();
 }
 
 bool Database::hasPendingTransaction()
 {
-    DeprecatedMutexLocker locker(m_transactionInProgressMutex);
+    MutexLocker locker(m_transactionInProgressMutex);
     return m_transactionInProgress || !m_transactionQueue.isEmpty();
 }
 
index 317e0ed..e61c20c 100644 (file)
@@ -58,7 +58,7 @@ public:
 
 private:
     bool m_taskCompleted;
-    DeprecatedMutex m_synchronousMutex;
+    Mutex m_synchronousMutex;
     ThreadCondition m_synchronousCondition;
 #ifndef NDEBUG
     bool m_hasCheckedForTermination;
index 7029825..2d76ef5 100644 (file)
@@ -61,7 +61,7 @@ DatabaseThread::~DatabaseThread()
 
 bool DatabaseThread::start()
 {
-    DeprecatedMutexLocker lock(m_threadCreationMutex);
+    MutexLocker lock(m_threadCreationMutex);
 
     if (m_threadID)
         return true;
@@ -100,7 +100,7 @@ void DatabaseThread::databaseThread()
 {
     {
         // Wait for DatabaseThread::start() to complete.
-        DeprecatedMutexLocker lock(m_threadCreationMutex);
+        MutexLocker lock(m_threadCreationMutex);
         LOG(StorageAPI, "Started DatabaseThread %p", this);
     }
 
index 8fdab79..dedb5e0 100644 (file)
@@ -72,7 +72,7 @@ private:
     static void databaseThreadStart(void*);
     void databaseThread();
 
-    DeprecatedMutex m_threadCreationMutex;
+    Mutex m_threadCreationMutex;
     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)
 {
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
     ASSERT(!m_database.isOpen());
     m_databaseDirectoryPath = path.isolatedCopy();
 }
@@ -166,7 +166,7 @@ bool DatabaseTracker::canEstablishDatabase(DatabaseContext* context, const Strin
 {
     error = DatabaseError::None;
 
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
     SecurityOrigin* origin = context->securityOrigin();
 
     if (isDeletingDatabaseOrOriginFor(origin, name)) {
@@ -218,7 +218,7 @@ bool DatabaseTracker::retryCanEstablishDatabase(DatabaseContext* context, const
 {
     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().
@@ -257,7 +257,7 @@ bool DatabaseTracker::hasEntryForOriginNoLock(SecurityOrigin* origin)
 
 bool DatabaseTracker::hasEntryForOrigin(SecurityOrigin* origin)
 {
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
     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
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
     SecurityOrigin* origin = database->securityOrigin();
 
     unsigned long long quota = quotaForOriginNoLock(origin);
@@ -311,7 +311,7 @@ void DatabaseTracker::closeAllDatabases()
 {
     Vector<Ref<Database>> openDatabases;
     {
-        DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
+        MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
         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)
 {
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
     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())
@@ -448,7 +448,7 @@ bool DatabaseTracker::databaseNamesForOrigin(SecurityOrigin* origin, Vector<Stri
 {
     Vector<String> temp;
     {
-        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+        MutexLocker lockDatabase(m_databaseGuard);
         if (!databaseNamesForOriginNoLock(origin, temp))
           return false;
     }
@@ -465,7 +465,7 @@ DatabaseDetails DatabaseTracker::detailsForNameAndOrigin(const String& name, Sec
     int64_t expectedUsage;
 
     {
-        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+        MutexLocker lockDatabase(m_databaseGuard);
 
         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;
 
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
 
     openTrackerDatabase(CreateIfDoesNotExist);
     if (!m_database.isOpen())
@@ -549,7 +549,7 @@ void DatabaseTracker::setDatabaseDetails(SecurityOrigin* origin, const String& n
 
 void DatabaseTracker::doneCreatingDatabase(Database* database)
 {
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
     doneCreatingDatabase(database->securityOrigin(), database->stringIdentifier());
 }
 
@@ -559,7 +559,7 @@ void DatabaseTracker::addOpenDatabase(Database* database)
         return;
 
     {
-        DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
+        MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
 
         if (!m_openDatabaseMap)
             m_openDatabaseMap = std::make_unique<DatabaseOriginMap>();
@@ -589,7 +589,7 @@ void DatabaseTracker::removeOpenDatabase(Database* database)
         return;
 
     {
-        DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
+        MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
 
         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)
 {
-    DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
+    MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
     if (!m_openDatabaseMap)
         return;
 
@@ -647,7 +647,7 @@ void DatabaseTracker::getOpenDatabases(SecurityOrigin* origin, const String& nam
 
 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
@@ -727,13 +727,13 @@ unsigned long long DatabaseTracker::quotaForOriginNoLock(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)
 {
-    DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+    MutexLocker lockDatabase(m_databaseGuard);
 
     if (quotaForOriginNoLock(origin) == quota)
         return;
@@ -864,7 +864,7 @@ bool DatabaseTracker::deleteOrigin(SecurityOrigin* origin)
 {
     Vector<String> databaseNames;
     {
-        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+        MutexLocker lockDatabase(m_databaseGuard);
         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);
 
@@ -1071,7 +1071,7 @@ void DatabaseTracker::doneDeletingOrigin(SecurityOrigin *origin)
 bool DatabaseTracker::deleteDatabase(SecurityOrigin* origin, const String& name)
 {
     {
-        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+        MutexLocker lockDatabase(m_databaseGuard);
         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());
-        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+        MutexLocker lockDatabase(m_databaseGuard);
         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) {
@@ -1131,7 +1131,7 @@ bool DatabaseTracker::deleteDatabaseFile(SecurityOrigin* origin, const String& n
 
 #ifndef NDEBUG
     {
-        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+        MutexLocker lockDatabase(m_databaseGuard);
         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.
     {
-        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);
@@ -1185,7 +1185,7 @@ void DatabaseTracker::removeDeletedOpenedDatabases()
     
     {
         // Acquire the lock before calling openTrackerDatabase.
-        DeprecatedMutexLocker lockDatabase(m_databaseGuard);
+        MutexLocker lockDatabase(m_databaseGuard);
         openTrackerDatabase(DontCreateIfDoesNotExist);
     }
 
@@ -1201,7 +1201,7 @@ void DatabaseTracker::removeDeletedOpenedDatabases()
     // 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;
@@ -1305,9 +1305,9 @@ bool DatabaseTracker::deleteDatabaseFileIfEmpty(const String& path)
     return SQLiteFileSystem::deleteDatabaseFile(path);
 }
 
-DeprecatedMutex& DatabaseTracker::openDatabaseMutex()
+Mutex& DatabaseTracker::openDatabaseMutex()
 {
-    static NeverDestroyed<DeprecatedMutex> mutex;
+    static NeverDestroyed<Mutex> mutex;
     return mutex;
 }
 
@@ -1330,9 +1330,9 @@ void DatabaseTracker::setClient(DatabaseManagerClient* client)
     m_client = client;
 }
 
-static DeprecatedMutex& notificationMutex()
+static Mutex& notificationMutex()
 {
-    static NeverDestroyed<DeprecatedMutex> mutex;
+    static NeverDestroyed<Mutex> mutex;
     return mutex;
 }
 
@@ -1346,7 +1346,7 @@ static NotificationQueue& notificationQueue()
 
 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();
@@ -1372,7 +1372,7 @@ void DatabaseTracker::notifyDatabasesChanged(void*)
 
     NotificationQueue notifications;
     {
-        DeprecatedMutexLocker locker(notificationMutex());
+        MutexLocker locker(notificationMutex());
 
         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.
-    static DeprecatedMutex& openDatabaseMutex();
+    static Mutex& openDatabaseMutex();
     
     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;
 
-    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.
-    DeprecatedMutex m_databaseGuard;
+    Mutex m_databaseGuard;
     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;
-    DeprecatedMutex m_mutex;
+    Mutex m_mutex;
 #if USE(FILE_LOCK)
     PlatformFileHandle m_lockHandle;
 #endif
index 995aaaf..ca22801 100644 (file)
@@ -58,7 +58,7 @@ public:
         ScriptExecutionContext* scriptExecutionContextPtr;
         T* callback;
         {
-            DeprecatedMutexLocker locker(m_mutex);
+            MutexLocker locker(m_mutex);
             if (!m_callback) {
                 ASSERT(!m_scriptExecutionContext);
                 return;
@@ -83,7 +83,7 @@ public:
 
     PassRefPtr<T> unwrap()
     {
-        DeprecatedMutexLocker locker(m_mutex);
+        MutexLocker locker(m_mutex);
         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:
-    DeprecatedMutex m_mutex;
+    Mutex m_mutex;
     RefPtr<T> m_callback;
     RefPtr<ScriptExecutionContext> m_scriptExecutionContext;
 };
index 4ba4450..3fb6ad2 100644 (file)
@@ -381,7 +381,7 @@ void SQLTransactionBackend::doCleanup()
 
     releaseOriginLockIfNeeded();
 
-    DeprecatedMutexLocker locker(m_statementMutex);
+    MutexLocker locker(m_statementMutex);
     m_statementQueue.clear();
 
     if (m_sqliteTransaction) {
@@ -465,7 +465,7 @@ SQLTransactionBackend::StateFunction SQLTransactionBackend::stateFunctionFor(SQL
 
 void SQLTransactionBackend::enqueueStatementBackend(PassRefPtr<SQLStatementBackend> statementBackend)
 {
-    DeprecatedMutexLocker locker(m_statementMutex);
+    MutexLocker locker(m_statementMutex);
     m_statementQueue.append(statementBackend);
 }
 
@@ -665,7 +665,7 @@ void SQLTransactionBackend::getNextStatement()
 {
     m_currentStatementBackend = nullptr;
 
-    DeprecatedMutexLocker locker(m_statementMutex);
+    MutexLocker locker(m_statementMutex);
     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;
 
-    DeprecatedMutex m_statementMutex;
+    Mutex m_statementMutex;
     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.
-    DeprecatedMutexLocker locker(m_scheduledTerminationMutex);
+    MutexLocker locker(m_scheduledTerminationMutex);
     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.
-    DeprecatedMutexLocker locker(m_scheduledTerminationMutex);
+    MutexLocker locker(m_scheduledTerminationMutex);
     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;
-        mutable DeprecatedMutex m_scheduledTerminationMutex;
+        mutable Mutex m_scheduledTerminationMutex;
     };
 
 } // 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)
 {
-    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)));
@@ -98,7 +98,7 @@ void MessagePortChannel::postMessageToRemote(PassRefPtr<SerializedScriptValue> m
 
 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;
@@ -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?
-    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?
-    DeprecatedMutexLocker lock(m_channel->m_mutex);
+    MutexLocker lock(m_channel->m_mutex);
     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()
@@ -164,7 +164,7 @@ PlatformMessagePortChannel::~PlatformMessagePortChannel()
 
 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;
@@ -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.
-    DeprecatedMutexLocker lock(m_mutex);
+    MutexLocker lock(m_mutex);
     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;
index bffb15d..b703d12 100644 (file)
@@ -95,8 +95,8 @@ namespace WebCore {
         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;
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
     {
-        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
@@ -200,14 +200,14 @@ void IconDatabase::removeAllIcons()
                     
         // 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
         {
-            DeprecatedMutexLocker locker(m_pendingReadingLock);
+            MutexLocker locker(m_pendingReadingLock);
             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;
 
-    DeprecatedMutexLocker locker(m_urlAndIconLock);
+    MutexLocker locker(m_urlAndIconLock);
 
     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) {
-        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
@@ -276,7 +276,7 @@ Image* IconDatabase::synchronousIconForPageURL(const String& pageURLOriginal, co
         if (pageURLCopy.isNull())
             pageURLCopy = pageURLOriginal.isolatedCopy();
     
-        DeprecatedMutexLocker locker(m_pendingReadingLock);
+        MutexLocker locker(m_pendingReadingLock);
         m_pageURLsInterestedInIcons.add(pageURLCopy);
         m_iconsPendingReading.add(iconRecord);
         wakeSyncThread();
@@ -307,7 +307,7 @@ PassNativeImagePtr IconDatabase::synchronousNativeIconForPageURL(const String& p
     if (!icon)
         return 0;
 
-    DeprecatedMutexLocker locker(m_urlAndIconLock);
+    MutexLocker locker(m_urlAndIconLock);
     return icon->nativeImageForCurrentFrame();
 }
 
@@ -329,7 +329,7 @@ String IconDatabase::synchronousIconURLForPageURL(const String& pageURLOriginal)
     if (!isOpen() || !documentCanHaveIcon(pageURLOriginal))
         return String();
         
-    DeprecatedMutexLocker locker(m_urlAndIconLock);
+    MutexLocker locker(m_urlAndIconLock);
     
     PageURLRecord* pageRecord = m_pageURLToRecordMap.get(pageURLOriginal);
     if (!pageRecord)
@@ -417,7 +417,7 @@ void IconDatabase::retainIconForPageURL(const String& pageURL)
         return;
 
     {
-        DeprecatedMutexLocker locker(m_urlsToRetainOrReleaseLock);
+        MutexLocker locker(m_urlsToRetainOrReleaseLock);
         m_urlsToRetain.add(pageURL.isolatedCopy());
         m_retainOrReleaseIconRequested = true;
     }
@@ -450,7 +450,7 @@ void IconDatabase::performRetainIconForPageURL(const String& pageURLOriginal, in
         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)) {
@@ -470,7 +470,7 @@ void IconDatabase::releaseIconForPageURL(const String& pageURL)
         return;
 
     {
-        DeprecatedMutexLocker locker(m_urlsToRetainOrReleaseLock);
+        MutexLocker locker(m_urlsToRetainOrReleaseLock);
         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));
 
     {
-        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)
@@ -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) {
-        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
@@ -548,12 +548,12 @@ void IconDatabase::setIconDataForIconURL(PassRefPtr<SharedBuffer> dataOriginal,
     
     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) {
-            DeprecatedMutexLocker locker(m_pendingReadingLock);
+            MutexLocker locker(m_pendingReadingLock);
             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) {
-            DeprecatedMutexLocker locker(m_pendingSyncLock);
+            MutexLocker locker(m_pendingSyncLock);
             m_iconsPendingSync.set(iconURL, icon->snapshot());
         }
 
@@ -608,7 +608,7 @@ void IconDatabase::setIconURLForPageURL(const String& iconURLOriginal, const Str
     String iconURL, pageURL;
     
     {
-        DeprecatedMutexLocker locker(m_urlAndIconLock);
+        MutexLocker locker(m_urlAndIconLock);
 
         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());
-            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) {
-            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
@@ -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
     {
-        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;
@@ -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
-    DeprecatedMutexLocker readingLocker(m_pendingReadingLock);
+    MutexLocker readingLocker(m_pendingReadingLock);
     if (m_iconURLImportComplete)
         return IconLoadYes;
         
@@ -699,7 +699,7 @@ bool IconDatabase::synchronousIconDataKnownForIconURL(const String& iconURL)
 {
     ASSERT_NOT_SYNC_THREAD();
     
-    DeprecatedMutexLocker locker(m_urlAndIconLock);
+    MutexLocker locker(m_urlAndIconLock);
     if (IconRecord* icon = m_iconURLToRecordMap.get(iconURL))
         return icon->imageDataStatus() != ImageDataStatusUnknown;
 
@@ -754,26 +754,26 @@ void IconDatabase::checkIntegrityBeforeOpening()
 
 size_t IconDatabase::pageURLMappingCount()
 {
-    DeprecatedMutexLocker locker(m_urlAndIconLock);
+    MutexLocker locker(m_urlAndIconLock);
     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()
 {
-    DeprecatedMutexLocker locker(m_urlAndIconLock);
+    MutexLocker locker(m_urlAndIconLock);
     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();
@@ -829,7 +829,7 @@ void IconDatabase::notifyPendingLoadDecisions()
 
 void IconDatabase::wakeSyncThread()
 {
-    DeprecatedMutexLocker locker(m_syncLock);
+    MutexLocker locker(m_syncLock);
 
     if (!m_disableSuddenTerminationWhileSyncThreadHasWorkToDo)
         m_disableSuddenTerminationWhileSyncThreadHasWorkToDo = std::make_unique<SuddenTerminationDisabler>();
@@ -874,13 +874,13 @@ bool IconDatabase::isOpen() const
 
 bool IconDatabase::isOpenBesidesMainThreadCallbacks() const
 {
-    DeprecatedMutexLocker locker(m_syncLock);
+    MutexLocker locker(m_syncLock);
     return m_syncThreadRunning || m_syncDB.isOpen();
 }
 
 String IconDatabase::databasePath() const
 {
-    DeprecatedMutexLocker locker(m_syncLock);
+    MutexLocker locker(m_syncLock);
     return m_completeDatabasePath.isolatedCopy();
 }
 
@@ -916,7 +916,7 @@ PageURLRecord* IconDatabase::getOrCreatePageURLRecord(const String& 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) {
@@ -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;
@@ -1113,7 +1113,7 @@ void IconDatabase::performOpenInitialization()
             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);
@@ -1215,7 +1215,7 @@ void IconDatabase::performURLImport()
         String iconURL = query.getColumnText(1);
 
         {
-            DeprecatedMutexLocker locker(m_urlAndIconLock);
+            MutexLocker locker(m_urlAndIconLock);
 
             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
         {
-            DeprecatedMutexLocker locker(m_pendingReadingLock);
+            MutexLocker locker(m_pendingReadingLock);
             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;
     {
-        DeprecatedMutexLocker locker(m_pendingReadingLock);
+        MutexLocker locker(m_pendingReadingLock);
 
         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
     {
-        DeprecatedMutexLocker locker(m_urlAndIconLock);
+        MutexLocker locker(m_urlAndIconLock);
 
         performPendingRetainAndReleaseOperations();
 
@@ -1301,12 +1301,12 @@ void IconDatabase::performURLImport()
                         m_iconURLToRecordMap.remove(iconRecord->iconURL());
                         
                         {
-                            DeprecatedMutexLocker locker(m_pendingReadingLock);
+                            MutexLocker locker(m_pendingReadingLock);
                             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));                    
                         }
                     }
@@ -1371,7 +1371,7 @@ void IconDatabase::syncThreadMainLoop()
             break;
 
         {
-            DeprecatedMutexLocker locker(m_urlAndIconLock);
+            MutexLocker locker(m_urlAndIconLock);
             performPendingRetainAndReleaseOperations();
         }
         
@@ -1451,7 +1451,7 @@ void IconDatabase::performPendingRetainAndReleaseOperations()
     HashCountedSet<String> toRelease;
 
     {
-        DeprecatedMutexLocker pendingWorkLocker(m_urlsToRetainOrReleaseLock);
+        MutexLocker pendingWorkLocker(m_urlsToRetainOrReleaseLock);
         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;
     {
-        DeprecatedMutexLocker locker(m_pendingReadingLock);
+        MutexLocker locker(m_pendingReadingLock);
         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
         {
-            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
@@ -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
     {
-        DeprecatedMutexLocker locker(m_urlAndIconLock);
+        MutexLocker locker(m_urlAndIconLock);
         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();
@@ -1658,7 +1658,7 @@ void IconDatabase::pruneUnretainedIcons()
     
     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));
     }
@@ -1791,7 +1791,7 @@ void* IconDatabase::cleanupSyncThread()
     writeToDatabase();
     
     // Close the database
-    DeprecatedMutexLocker locker(m_syncLock);
+    MutexLocker locker(m_syncLock);
     
     m_databaseDirectory = String();
     m_completeDatabasePath = String();
index f9edd41..22a30fd 100644 (file)
@@ -141,7 +141,7 @@ private:
     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
@@ -153,24 +153,24 @@ private:
     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;
 
-    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;
     
-    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;
 
-    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;
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
-    DeprecatedMutexLocker lock(m_mutex);
+    MutexLocker lock(m_mutex);
 
     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))) {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
 
         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)
 {
-    DeprecatedMutexLocker locker(m_swipeStateMutex);
+    MutexLocker locker(m_swipeStateMutex);
 
     m_mainFramePinnedToTheLeft = pinnedToTheLeft;
     m_mainFramePinnedToTheRight = pinnedToTheRight;
@@ -218,54 +218,54 @@ void ScrollingTree::setMainFramePinState(bool pinnedToTheLeft, bool pinnedToTheR
 
 FloatPoint ScrollingTree::mainFrameScrollPosition()
 {
-    DeprecatedMutexLocker lock(m_mutex);
+    MutexLocker lock(m_mutex);
     return m_mainFrameScrollPosition;
 }
 
 void ScrollingTree::setMainFrameScrollPosition(FloatPoint position)
 {
-    DeprecatedMutexLocker lock(m_mutex);
+    MutexLocker lock(m_mutex);
     m_mainFrameScrollPosition = position;
 }
 
 bool ScrollingTree::isPointInNonFastScrollableRegion(IntPoint p)
 {
-    DeprecatedMutexLocker lock(m_mutex);
+    MutexLocker lock(m_mutex);
     
     return m_nonFastScrollableRegion.contains(p);
 }
 
 bool ScrollingTree::isRubberBandInProgress()
 {
-    DeprecatedMutexLocker lock(m_mutex);    
+    MutexLocker lock(m_mutex);    
 
     return m_mainFrameIsRubberBanding;
 }
 
 void ScrollingTree::setMainFrameIsRubberBanding(bool isRubberBanding)
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     m_mainFrameIsRubberBanding = isRubberBanding;
 }
 
 bool ScrollingTree::isScrollSnapInProgress()
 {
-    DeprecatedMutexLocker lock(m_mutex);
+    MutexLocker lock(m_mutex);
     
     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)
 {
-    DeprecatedMutexLocker locker(m_swipeStateMutex);
+    MutexLocker locker(m_swipeStateMutex);
 
     m_rubberBandsAtLeft = canRubberBandAtLeft;
     m_rubberBandsAtRight = canRubberBandAtRight;
@@ -275,28 +275,28 @@ void ScrollingTree::setCanRubberBandState(bool canRubberBandAtLeft, bool canRubb
 
 bool ScrollingTree::rubberBandsAtLeft()
 {
-    DeprecatedMutexLocker lock(m_swipeStateMutex);
+    MutexLocker lock(m_swipeStateMutex);
 
     return m_rubberBandsAtLeft;
 }
 
 bool ScrollingTree::rubberBandsAtRight()
 {
-    DeprecatedMutexLocker lock(m_swipeStateMutex);
+    MutexLocker lock(m_swipeStateMutex);
 
     return m_rubberBandsAtRight;
 }
 
 bool ScrollingTree::rubberBandsAtBottom()
 {
-    DeprecatedMutexLocker lock(m_swipeStateMutex);
+    MutexLocker lock(m_swipeStateMutex);
 
     return m_rubberBandsAtBottom;
 }
 
 bool ScrollingTree::rubberBandsAtTop()
 {
-    DeprecatedMutexLocker lock(m_swipeStateMutex);
+    MutexLocker lock(m_swipeStateMutex);
 
     return m_rubberBandsAtTop;
 }
@@ -308,14 +308,14 @@ bool ScrollingTree::isHandlingProgrammaticScroll()
 
 void ScrollingTree::setScrollPinningBehavior(ScrollPinningBehavior pinning)
 {
-    DeprecatedMutexLocker locker(m_swipeStateMutex);
+    MutexLocker locker(m_swipeStateMutex);
     
     m_scrollPinningBehavior = pinning;
 }
 
 ScrollPinningBehavior ScrollingTree::scrollPinningBehavior()
 {
-    DeprecatedMutexLocker lock(m_swipeStateMutex);
+    MutexLocker lock(m_swipeStateMutex);
     
     return m_scrollPinningBehavior;
 }
@@ -325,7 +325,7 @@ bool ScrollingTree::willWheelEventStartSwipeGesture(const PlatformWheelEvent& wh
     if (wheelEvent.phase() != PlatformWheelEventPhaseBegan)
         return false;
 
-    DeprecatedMutexLocker lock(m_swipeStateMutex);
+    MutexLocker lock(m_swipeStateMutex);
 
     if (wheelEvent.deltaX() > 0 && m_mainFramePinnedToTheLeft && !m_rubberBandsAtLeft)
         return true;
@@ -351,19 +351,19 @@ bool ScrollingTree::scrollingPerformanceLoggingEnabled()
 
 ScrollingNodeID ScrollingTree::latchedNode()
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
     return m_latchedNode;
 }
 
 void ScrollingTree::setLatchedNode(ScrollingNodeID node)
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
     m_latchedNode = node;
 }
 
 void ScrollingTree::clearLatchedNode()
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
     m_latchedNode = 0;
 }
 
index 7d10c05..12cb26f 100644 (file)
@@ -160,11 +160,11 @@ private:
     typedef HashMap<ScrollingNodeID, ScrollingTreeNode*> ScrollingTreeNodeMap;
     ScrollingTreeNodeMap m_nodeMap;
 
-    DeprecatedMutex m_mutex;
+    Mutex m_mutex;
     Region m_nonFastScrollableRegion;
     FloatPoint m_mainFrameScrollPosition;
 
-    DeprecatedMutex m_swipeStateMutex;
+    Mutex m_swipeStateMutex;
     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;
-    DeprecatedMutex m_observerMutex;
+    Mutex m_observerMutex;
 #elif OS(LINUX)
     int m_eventFD;
     int m_pressureLevelFD;
index 7c21f1f..dd55938 100644 (file)
@@ -102,7 +102,7 @@ void HRTFDatabaseLoader::loadAsynchronously()
 {
     ASSERT(isMainThread());
 
-    DeprecatedMutexLocker locker(m_threadLock);
+    MutexLocker locker(m_threadLock);
     
     if (!m_hrtfDatabase.get() && !m_databaseLoaderThread) {
         // Start the asynchronous database loading process.
@@ -117,7 +117,7 @@ bool HRTFDatabaseLoader::isLoaded() const
 
 void HRTFDatabaseLoader::waitForLoaderThreadCompletion()
 {
-    DeprecatedMutexLocker locker(m_threadLock);
+    MutexLocker locker(m_threadLock);
     
     // 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.
-    DeprecatedMutex m_threadLock;
+    Mutex m_threadLock;
     ThreadIdentifier m_databaseLoaderThread;
 
     float m_databaseSampleRate;
index 46c47ab..5ed366d 100644 (file)
@@ -256,7 +256,7 @@ void MemoryPressureHandler::setReceivedMemoryPressure(MemoryPressureReason reaso
     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);
@@ -272,14 +272,14 @@ void MemoryPressureHandler::clearMemoryPressure()
     m_underMemoryPressure = false;
 
     {
-        DeprecatedMutexLocker locker(m_observerMutex);
+        MutexLocker locker(m_observerMutex);
         m_memoryPressureReason = MemoryPressureReasonNone;
     }
 }
 
 bool MemoryPressureHandler::shouldWaitForMemoryClearMessage()
 {
-    DeprecatedMutexLocker locker(m_observerMutex);
+    MutexLocker locker(m_observerMutex);
     return m_memoryPressureReason & MemoryPressureReasonVMStatus;
 }
 
@@ -288,7 +288,7 @@ void MemoryPressureHandler::respondToMemoryPressureIfNeeded()
     ASSERT(WebThreadIsLockedOrDisabled());
 
     {
-        DeprecatedMutexLocker locker(m_observerMutex);
+        MutexLocker locker(m_observerMutex);
         m_observer = 0;
     }
 
index 64c74d9..f23808c 100644 (file)
@@ -89,7 +89,7 @@ void DisplayRefreshMonitor::displayDidRefresh()
     double monotonicAnimationStartTime;
 
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         if (!m_scheduled)
             ++m_unscheduledFireCount;
         else
@@ -121,7 +121,7 @@ void DisplayRefreshMonitor::displayDidRefresh()
         m_clientsToBeNotified = nullptr;
 
     {
-        DeprecatedMutexLocker lock(m_mutex);
+        MutexLocker lock(m_mutex);
         m_previousFrameDone = true;
     }
     
index 41c1cce..bb8c961 100644 (file)
@@ -72,7 +72,7 @@ public:
 
     void setMonotonicAnimationStartTime(double startTime) { m_monotonicAnimationStartTime = startTime; }
 
-    DeprecatedMutex& mutex() { return m_mutex; }
+    Mutex& mutex() { return m_mutex; }
 
     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;
-    DeprecatedMutex m_mutex;
+    Mutex m_mutex;
 
     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
 {
-    DeprecatedMutexLocker lock(m_queueMutex);
+    MutexLocker lock(m_queueMutex);
     if (delay)
         ++m_delayCallbacks;
     else {
@@ -759,7 +759,7 @@ void MediaPlayerPrivateAVFoundation::mainThreadCallback(void* context)
 
 void MediaPlayerPrivateAVFoundation::clearMainThreadPendingFlag()
 {
-    DeprecatedMutexLocker lock(m_queueMutex);
+    MutexLocker lock(m_queueMutex);
     m_mainThreadCallPending = false;
 }
 
@@ -825,7 +825,7 @@ void MediaPlayerPrivateAVFoundation::dispatchNotification()
 
     Notification notification = Notification();
     {
-        DeprecatedMutexLocker lock(m_queueMutex);
+        MutexLocker lock(m_queueMutex);
         
         if (m_queuedNotifications.isEmpty())
             return;
index 22c3487..a84d377 100644 (file)
@@ -317,7 +317,7 @@ private:
     std::function<void()> m_pendingSeek;
 
     Vector<Notification> m_queuedNotifications;
-    mutable DeprecatedMutex m_queueMutex;
+    mutable Mutex m_queueMutex;
 
     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); }
 
-    static DeprecatedMutex& mapLock();
+    static Mutex& mapLock();
     static HashMap<uintptr_t, AVFWrapper*>& map();
     static AVFWrapper* avfWrapperForCallbackContext(void*);
     void addToMap();
@@ -1403,9 +1403,9 @@ AVFWrapper::~AVFWrapper()
     m_avPlayer = 0;
 }
 
-DeprecatedMutex& AVFWrapper::mapLock()
+Mutex& AVFWrapper::mapLock()
 {
-    static DeprecatedMutex mapLock;
+    static Mutex mapLock;
     return mapLock;
 }
 
@@ -1417,7 +1417,7 @@ HashMap<uintptr_t, AVFWrapper*>& AVFWrapper::map()
 
 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.
@@ -1433,7 +1433,7 @@ void AVFWrapper::removeFromMap() const
 {
     LOG(Media, "AVFWrapper::removeFromMap(%p %d)", this, m_objectID);
 
-    DeprecatedMutexLocker locker(mapLock());
+    MutexLocker locker(mapLock());
     map().remove(m_objectID);
 }
 
@@ -1634,7 +1634,7 @@ void AVFWrapper::createPlayerItem()
 
 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));
@@ -1665,7 +1665,7 @@ void AVFWrapper::processNotification(void* 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));
@@ -1720,7 +1720,7 @@ void AVFWrapper::notificationCallback(CFNotificationCenterRef, void* observer, C
 
 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));
@@ -1748,7 +1748,7 @@ void AVFWrapper::checkPlayability()
 
 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));
@@ -1768,7 +1768,7 @@ void AVFWrapper::beginLoadingMetadata()
 
 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));
@@ -1811,7 +1811,7 @@ void AVFWrapper::processCue(void* 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));
@@ -1827,7 +1827,7 @@ void AVFWrapper::processCue(void* context)
 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));
@@ -1865,7 +1865,7 @@ void AVFWrapper::processShouldWaitForLoadingOfResource(void* 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));
@@ -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());
-    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));
index d39419a..29e884b 100644 (file)
@@ -77,7 +77,7 @@ void InbandTextTrackPrivateGStreamer::handleSample(GRefPtr<GstSample> sample)
 {
     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)));
@@ -92,7 +92,7 @@ void InbandTextTrackPrivateGStreamer::notifyTrackOfSample()
 {
     Vector<GRefPtr<GstSample> > samples;
     {
-        DeprecatedMutexLocker lock(m_sampleMutex);
+        MutexLocker lock(m_sampleMutex);
         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;
-    DeprecatedMutex m_sampleMutex;
+    Mutex m_sampleMutex;
 };
 
 } // 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);
     {
-        DeprecatedMutexLocker lock(m_tagMutex);
+        MutexLocker lock(m_tagMutex);
         m_tags.swap(tags);
     }
 
@@ -158,7 +158,7 @@ void TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged()
 
     GRefPtr<GstTagList> tags;
     {
-        DeprecatedMutexLocker lock(m_tagMutex);
+        MutexLocker lock(m_tagMutex);
         tags.swap(m_tags);
     }
     if (!tags)
index 0647267..e3d6f41 100644 (file)
@@ -73,7 +73,7 @@ private:
     GThreadSafeMainLoopSource m_activeTimerHandler;
     GThreadSafeMainLoopSource m_tagTimerHandler;
 
-    DeprecatedMutex m_tagMutex;
+    Mutex m_tagMutex;
     GRefPtr<GstTagList> m_tags;
 };
 
index d972355..5125bb4 100644 (file)
@@ -84,14 +84,14 @@ bool DisplayRefreshMonitorMac::requestRefreshCallback()
         setIsActive(true);
     }
 
-    DeprecatedMutexLocker lock(mutex());
+    MutexLocker lock(mutex());
     setIsScheduled(true);
     return true;
 }
 
 void DisplayRefreshMonitorMac::displayLinkFired(double nowSeconds, double outputTimeSeconds)
 {
-    DeprecatedMutexLocker lock(mutex());
+    MutexLocker lock(mutex());
     if (!isPreviousFrameDone())
         return;
 
index c3827bf..63e7c58 100644 (file)
@@ -512,21 +512,21 @@ void MediaPlayerPrivateMediaFoundation::destroyVideoWindow()
 
 void MediaPlayerPrivateMediaFoundation::addListener(MediaPlayerListener* listener)
 {
-    DeprecatedMutexLocker locker(m_mutexListeners);
+    MutexLocker locker(m_mutexListeners);
 
     m_listeners.add(listener);
 }
 
 void MediaPlayerPrivateMediaFoundation::removeListener(MediaPlayerListener* listener)
 {
-    DeprecatedMutexLocker locker(m_mutexListeners);
+    MutexLocker locker(m_mutexListeners);
 
     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();
@@ -704,7 +704,7 @@ HRESULT STDMETHODCALLTYPE MediaPlayerPrivateMediaFoundation::AsyncCallback::GetP
 
 HRESULT STDMETHODCALLTYPE MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke(__RPC__in_opt IMFAsyncResult *pAsyncResult)
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     if (!m_mediaPlayer)
         return S_OK;
@@ -719,7 +719,7 @@ HRESULT STDMETHODCALLTYPE MediaPlayerPrivateMediaFoundation::AsyncCallback::Invo
 
 void MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted()
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     m_mediaPlayer = nullptr;
 }
index 0aa73c5..729d630 100644 (file)
@@ -89,7 +89,7 @@ private:
 
     class MediaPlayerListener;
     HashSet<MediaPlayerListener*> m_listeners;
-    DeprecatedMutex m_mutexListeners;
+    Mutex m_mutexListeners;
 
     COMPtr<IMFMediaSession> m_mediaSession;
     COMPtr<IMFSourceResolver> m_sourceResolver;
@@ -149,7 +149,7 @@ private:
         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;
 
-    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;
 };
index 8ac81ad..927e9a8 100644 (file)
@@ -147,7 +147,7 @@ void LegacyTileCache::setTilesOpaque(bool opaque)
     if (m_tilesOpaque == opaque)
         return;
 
-    DeprecatedMutexLocker locker(m_tileMutex);
+    MutexLocker locker(m_tileMutex);
 
     m_tilesOpaque = opaque;
     m_zoomedOutTileGrid->updateTileOpacity();
@@ -160,7 +160,7 @@ void LegacyTileCache::doLayoutTiles()
     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.
@@ -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.
-        DeprecatedMutexLocker locker(m_tileMutex);
+        MutexLocker locker(m_tileMutex);
         activeTileGrid()->dropAllTiles();
         activeTileGrid()->createTiles(CoverVisibleOnly);
     }
@@ -225,7 +225,7 @@ void LegacyTileCache::commitScaleChange()
     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);
@@ -314,7 +314,7 @@ void LegacyTileCache::layoutTilesNow()
     if (m_tilingMode == Zooming)
         m_tilingMode = Minimal;
 
-    DeprecatedMutexLocker locker(m_tileMutex);
+    MutexLocker locker(m_tileMutex);
     LegacyTileGrid* activeGrid = activeTileGrid();
     if (activeGrid->checkDoSingleTileLayout()) {
         m_tilingMode = savedTilingMode;
@@ -327,14 +327,14 @@ void LegacyTileCache::layoutTilesNow()
 void LegacyTileCache::layoutTilesNowForRect(const IntRect& rect)
 {
     ASSERT(WebThreadIsLockedOrDisabled());
-    DeprecatedMutexLocker locker(m_tileMutex);
+    MutexLocker locker(m_tileMutex);
 
     activeTileGrid()->addTilesCoveringRect(rect);
 }
 
 void LegacyTileCache::removeAllNonVisibleTiles()
 {
-    DeprecatedMutexLocker locker(m_tileMutex);
+    MutexLocker locker(m_tileMutex);
     removeAllNonVisibleTilesInternal();
 }
 
@@ -356,7 +356,7 @@ void LegacyTileCache::removeAllNonVisibleTilesInternal()
 
 void LegacyTileCache::removeAllTiles()
 {
-    DeprecatedMutexLocker locker(m_tileMutex);
+    MutexLocker locker(m_tileMutex);
     m_zoomedOutTileGrid->dropAllTiles();
     if (m_zoomedInTileGrid)
         m_zoomedInTileGrid->dropAllTiles();
@@ -364,7 +364,7 @@ void LegacyTileCache::removeAllTiles()
 
 void LegacyTileCache::removeForegroundTiles()
 {
-    DeprecatedMutexLocker locker(m_tileMutex);
+    MutexLocker locker(m_tileMutex);
     if (!keepsZoomedOutTiles())
         m_zoomedOutTileGrid->dropAllTiles();
     if (m_zoomedInTileGrid)
@@ -373,13 +373,13 @@ void LegacyTileCache::removeForegroundTiles()
 
 void LegacyTileCache::setContentReplacementImage(RetainPtr<CGImageRef> contentReplacementImage)
 {
-    DeprecatedMutexLocker locker(m_contentReplacementImageMutex);
+    MutexLocker locker(m_contentReplacementImageMutex);
     m_contentReplacementImage = contentReplacementImage;
 }
 
 RetainPtr<CGImageRef> LegacyTileCache::contentReplacementImage() const
 {
-    DeprecatedMutexLocker locker(m_contentReplacementImageMutex);
+    MutexLocker locker(m_contentReplacementImageMutex);
     return m_contentReplacementImage;
 }
 
@@ -426,7 +426,7 @@ void LegacyTileCache::tileCreationTimerFired()
 {
     if (isTileCreationSuspended())
         return;
-    DeprecatedMutexLocker locker(m_tileMutex);
+    MutexLocker locker(m_tileMutex);
     createTilesInActiveGrid(CoverSpeculative);
 }
 
@@ -620,7 +620,7 @@ void LegacyTileCache::scheduleLayerFlushForPendingRepaint()
 
 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)
@@ -692,7 +692,7 @@ void LegacyTileCache::updateTilingMode()
         if (m_tilingMode == Disabled)
             return;
 
-        DeprecatedMutexLocker locker(m_tileMutex);
+        MutexLocker locker(m_tileMutex);
         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) {
-        DeprecatedMutexLocker locker(m_tileMutex);
+        MutexLocker locker(m_tileMutex);
         bringActiveTileGridToFront();
     }
 
@@ -753,7 +753,7 @@ void LegacyTileCache::doPendingRepaints()
         return;
     if (isTileInvalidationSuspended())
         return;
-    DeprecatedMutexLocker locker(m_tileMutex);
+    MutexLocker locker(m_tileMutex);
     flushSavedDisplayRects();
 }
 
@@ -764,7 +764,7 @@ void LegacyTileCache::flushSavedDisplayRects()
 
     Vector<IntRect> rects;
     {
-        DeprecatedMutexLocker locker(m_savedDisplayRectMutex);
+        MutexLocker locker(m_savedDisplayRectMutex);
         m_savedDisplayRects.swap(rects);
     }
     size_t size = rects.size();
@@ -792,7 +792,7 @@ void LegacyTileCache::prepareToDraw()
     [[m_window contentView] viewWillDraw];
 
     if (!m_savedDisplayRects.isEmpty()) {
-        DeprecatedMutexLocker locker(m_tileMutex);
+        MutexLocker locker(m_tileMutex);
         flushSavedDisplayRects();
     }
 }
index 91e1ea0..30fe6be 100644 (file)
@@ -75,7 +75,7 @@ private:
     Vector<IntSize> m_sizesInPruneOrder;
     unsigned m_totalBytes;
     unsigned m_capacity;
-    DeprecatedMutex m_layerPoolMutex;
+    Mutex m_layerPoolMutex;
 
     double m_lastAddTime;
     bool m_needsPrune;
index 4a7c8fa..dad4c83 100644 (file)
@@ -84,7 +84,7 @@ void LegacyTileLayerPool::addLayer(const RetainPtr<LegacyTileLayer>& layer)
         return;
     }
 
-    DeprecatedMutexLocker locker(m_layerPoolMutex);
+    MutexLocker locker(m_layerPoolMutex);
     listOfLayersWithSize(layerSize).prepend(layer);
     m_totalBytes += bytesBackingLayerWithPixelSize(layerSize);
 
@@ -96,7 +96,7 @@ RetainPtr<LegacyTileLayer> LegacyTileLayerPool::takeLayerWithSize(const IntSize&
 {
     if (!canReuseLayerWithSize(size))
         return nil;
-    DeprecatedMutexLocker locker(m_layerPoolMutex);
+    MutexLocker locker(m_layerPoolMutex);
     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)
 {
-    DeprecatedMutexLocker reuseLocker(m_layerPoolMutex);
+    MutexLocker reuseLocker(m_layerPoolMutex);
     if (capacity < m_capacity)
         schedulePrune();
     m_capacity = capacity;
@@ -136,7 +136,7 @@ void LegacyTileLayerPool::schedulePrune()
 
 void LegacyTileLayerPool::prune()
 {
-    DeprecatedMutexLocker locker(m_layerPoolMutex);
+    MutexLocker locker(m_layerPoolMutex);
     ASSERT(m_needsPrune);
     m_needsPrune = false;
     unsigned shrinkTo = decayedCapacity();
@@ -163,7 +163,7 @@ void LegacyTileLayerPool::prune()
 
 void LegacyTileLayerPool::drain()
 {
-    DeprecatedMutexLocker reuseLocker(m_layerPoolMutex);
+    MutexLocker reuseLocker(m_layerPoolMutex);
     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)
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     m_pendingHandleList.append(curlHandle);
     startThreadIfNeeded();
@@ -70,7 +70,7 @@ bool CurlDownloadManager::add(CURL* curlHandle)
 
 bool CurlDownloadManager::remove(CURL* curlHandle)
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     m_removedHandleList.append(curlHandle);
 
@@ -79,13 +79,13 @@ bool CurlDownloadManager::remove(CURL* curlHandle)
 
 int CurlDownloadManager::getActiveDownloadCount() const
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
     return m_activeHandleList.size();
 }
 
 int CurlDownloadManager::getPendingDownloadCount() const
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
     return m_pendingHandleList.size();
 }
 
@@ -111,7 +111,7 @@ void CurlDownloadManager::stopThread()
 
 void CurlDownloadManager::stopThreadIfIdle()
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     if (!getActiveDownloadCount() && !getPendingDownloadCount())
         setRunThread(false);
@@ -119,7 +119,7 @@ void CurlDownloadManager::stopThreadIfIdle()
 
 void CurlDownloadManager::updateHandleList()
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     // Remove curl easy handles from multi list 
     int size = m_removedHandleList.size();
@@ -245,7 +245,7 @@ CurlDownload::CurlDownload()
 
 CurlDownload::~CurlDownload()
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     if (m_url)
         fastFree(m_url);
@@ -262,7 +262,7 @@ void CurlDownload::init(CurlDownloadListener* listener, const URL& url)
     if (!listener)
         return;
 
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     m_curlHandle = curl_easy_init();
 
@@ -295,7 +295,7 @@ void CurlDownload::init(CurlDownloadListener* listener, ResourceHandle*, const R
     if (!listener)
         return;
 
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     URL url(ParsedURLString, request.url());
 
@@ -317,25 +317,25 @@ bool CurlDownload::cancel()
 
 String CurlDownload::getTempPath() const
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
     return m_tempPath;
 }
 
 String CurlDownload::getUrl() const
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
     return String(m_url);
 }
 
 ResourceResponse CurlDownload::getResponse() const
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
     return m_response;
 }
 
 void CurlDownload::closeFile()
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     if (m_tempHandle != invalidPlatformFileHandle) {
         WebCore::closeFile(m_tempHandle);
@@ -390,7 +390,7 @@ void CurlDownload::addHeaders(const ResourceRequest& request)
 
 void CurlDownload::didReceiveHeader(const String& header)
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     if (header == "\r\n" || header == "\n") {
 
@@ -430,7 +430,7 @@ void CurlDownload::didReceiveHeader(const String& header)
 
 void CurlDownload::didReceiveData(void* data, int size)
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     RefPtr<CurlDownload> protectedDownload(this);
 
@@ -464,7 +464,7 @@ void CurlDownload::didFinish()
 
 void CurlDownload::didFail()
 {
-    DeprecatedMutexLocker locker(m_mutex);
+    MutexLocker locker(m_mutex);
 
     closeFile();
 
index 493ac27..64ba8a5 100644 (file)
@@ -73,7 +73,7 @@ private:
     Vector<CURL*> m_pendingHandleList;
     Vector<CURL*> m_activeHandleList;
     Vector<CURL*> m_removedHandleList;
-    mutable DeprecatedMutex m_mutex;
+    mutable Mutex m_mutex;
     bool m_runThread;
 };
 
@@ -140,7 +140,7 @@ private:
     WebCore::PlatformFileHandle m_tempHandle;
     WebCore::ResourceResponse m_response;
     bool m_deletesFileUponFailure;
-    mutable DeprecatedMutex m_mutex;
+    mutable Mutex m_mutex;
     CurlDownloadListener *m_listener;
 
     static CurlDownloadManager m_downloadManager;
index 3728464..ef7e7d9 100644 (file)
@@ -133,11 +133,10 @@ static char* cookieJarPath()
 #endif
 }
 
-static DeprecatedMutex* sharedResourceMutex(curl_lock_data data)
-{
-    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, cookieMutex, ());
-    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, dnsMutex, ());
-    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, shareMutex, ());
+static Mutex* sharedResourceMutex(curl_lock_data data) {
+    DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, cookieMutex, ());
+    DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, dnsMutex, ());
+    DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, shareMutex, ());
 
     switch (data) {
         case CURL_LOCK_DATA_COOKIE:
@@ -191,13 +190,13 @@ static void calculateWebTimingInformations(ResourceHandleInternal* d)
 // cache.
 static void curl_lock_callback(CURL* /* handle */, curl_lock_data data, curl_lock_access /* access */, void* /* userPtr */)
 {
-    if (DeprecatedMutex* mutex = sharedResourceMutex(data))
+    if (Mutex* mutex = sharedResourceMutex(data))
         mutex->lock();
 }
 
 static void curl_unlock_callback(CURL* /* handle */, curl_lock_data data, void* /* userPtr */)
 {
-    if (DeprecatedMutex* mutex = sharedResourceMutex(data))
+    if (Mutex* mutex = sharedResourceMutex(data))
         mutex->unlock();
 }
 
index 2b2ab0d..fcfd909 100644 (file)
@@ -85,9 +85,9 @@ NSDictionary *WebCore::QLDirectoryAttributes()
     return dictionary;
 }
 
-static DeprecatedMutex& qlPreviewConverterDictionaryMutex()
+static Mutex& qlPreviewConverterDictionaryMutex()
 {
-    static NeverDestroyed<DeprecatedMutex> mutex;
+    static NeverDestroyed<Mutex> mutex;
     return mutex;
 }
 
@@ -107,7 +107,7 @@ void WebCore::addQLPreviewConverterWithFileForURL(NSURL *url, id converter, NSSt
 {
     ASSERT(url);
     ASSERT(converter);
-    DeprecatedMutexLocker lock(qlPreviewConverterDictionaryMutex());
+    MutexLocker lock(qlPreviewConverterDictionaryMutex());
     [QLPreviewConverterDictionary() setObject:converter forKey:url];
     [QLContentDictionary() setObject:(fileName ? fileName : @"") forKey:url];
 }
@@ -121,7 +121,7 @@ NSString *WebCore::qlPreviewConverterUTIForURL(NSURL *url)
 {
     id converter = nil;
     {
-        DeprecatedMutexLocker lock(qlPreviewConverterDictionaryMutex());
+        MutexLocker lock(qlPreviewConverterDictionaryMutex());
         converter = [QLPreviewConverterDictionary() objectForKey:url];
     }
     if (!converter)
@@ -131,7 +131,7 @@ NSString *WebCore::qlPreviewConverterUTIForURL(NSURL *url)
 
 void WebCore::removeQLPreviewConverterForURL(NSURL *url)
 {
-    DeprecatedMutexLocker lock(qlPreviewConverterDictionaryMutex());
+    MutexLocker lock(qlPreviewConverterDictionaryMutex());
     [QLPreviewConverterDictionary() removeObjectForKey:url];
 
     // Delete the file when we remove the preview converter
@@ -166,7 +166,7 @@ const URL WebCore::safeQLURLForDocumentURLAndResourceURL(const URL& documentURL,
     id converter = nil;
     NSURL *nsDocumentURL = documentURL;
     {
-        DeprecatedMutexLocker lock(qlPreviewConverterDictionaryMutex());
+        MutexLocker lock(qlPreviewConverterDictionaryMutex());
         converter = [QLPreviewConverterDictionary() objectForKey:nsDocumentURL];
     }
 
index 69a5b16..6c8eb34 100644 (file)
@@ -120,7 +120,7 @@ void SQLiteDatabase::close()
         // ASSERT(currentThread() == m_openingThread);
         sqlite3* db = m_db;
         {
-            DeprecatedMutexLocker locker(m_databaseClosingMutex);
+            MutexLocker locker(m_databaseClosingMutex);
             m_db = 0;
         }
         sqlite3_close(db);
@@ -160,7 +160,7 @@ int64_t SQLiteDatabase::maximumSize()
     int64_t maxPageCount = 0;
 
     {
-        DeprecatedMutexLocker locker(m_authorizerLock);
+        MutexLocker locker(m_authorizerLock);
         enableAuthorizer(false);
         SQLiteStatement statement(*this, ASCIILiteral("PRAGMA max_page_count"));
         maxPageCount = statement.getColumnInt64(0);
@@ -180,7 +180,7 @@ void SQLiteDatabase::setMaximumSize(int64_t size)
     ASSERT(currentPageSize || !m_db);
     int64_t newMaxPageCount = currentPageSize ? size / currentPageSize : 0;
     
-    DeprecatedMutexLocker locker(m_authorizerLock);
+    MutexLocker locker(m_authorizerLock);
     enableAuthorizer(false);
 
     SQLiteStatement statement(*this, "PRAGMA max_page_count = " + String::number(newMaxPageCount));
@@ -197,7 +197,7 @@ int SQLiteDatabase::pageSize()
     // Since the page size of a database is locked in at creation and therefore cannot be dynamic, 
     // we can cache the value for future use
     if (m_pageSize == -1) {
-        DeprecatedMutexLocker locker(m_authorizerLock);
+        MutexLocker locker(m_authorizerLock);
         enableAuthorizer(false);
         
         SQLiteStatement statement(*this, ASCIILiteral("PRAGMA page_size"));
@@ -214,7 +214,7 @@ int64_t SQLiteDatabase::freeSpaceSize()
     int64_t freelistCount = 0;
 
     {
-        DeprecatedMutexLocker locker(m_authorizerLock);
+        MutexLocker locker(m_authorizerLock);
         enableAuthorizer(false);
         // Note: freelist_count was added in SQLite 3.4.1.
         SQLiteStatement statement(*this, ASCIILiteral("PRAGMA freelist_count"));
@@ -230,7 +230,7 @@ int64_t SQLiteDatabase::totalSize()
     int64_t pageCount = 0;
 
     {
-        DeprecatedMutexLocker locker(m_authorizerLock);
+        MutexLocker locker(m_authorizerLock);
         enableAuthorizer(false);
         SQLiteStatement statement(*this, ASCIILiteral("PRAGMA page_count"));
         pageCount = statement.getColumnInt64(0);
@@ -309,7 +309,7 @@ int SQLiteDatabase::runVacuumCommand()
 
 int SQLiteDatabase::runIncrementalVacuumCommand()
 {
-    DeprecatedMutexLocker locker(m_authorizerLock);
+    MutexLocker locker(m_authorizerLock);
     enableAuthorizer(false);
 
     if (!executeCommand(ASCIILiteral("PRAGMA incremental_vacuum")))
@@ -450,7 +450,7 @@ void SQLiteDatabase::setAuthorizer(PassRefPtr<DatabaseAuthorizer> auth)
         return;
     }
 
-    DeprecatedMutexLocker locker(m_authorizerLock);
+    MutexLocker locker(m_authorizerLock);
 
     m_authorizer = auth;
     
index 2a0acb6..ff09bd3 100644 (file)
@@ -106,7 +106,7 @@ public:
     
     void setAuthorizer(PassRefPtr<DatabaseAuthorizer>);
 
-    DeprecatedMutex& databaseMutex() { return m_lockingMutex; }
+    Mutex& databaseMutex() { return m_lockingMutex; }
     bool isAutoCommitOn() const;
 
     // The SQLite AUTO_VACUUM pragma can be either NONE, FULL, or INCREMENTAL.
@@ -147,13 +147,13 @@ private:
     bool m_transactionInProgress;
     bool m_sharable;
     
-    DeprecatedMutex m_authorizerLock;
+    Mutex m_authorizerLock;
     RefPtr<DatabaseAuthorizer> m_authorizer;
 
-    DeprecatedMutex m_lockingMutex;
+    Mutex m_lockingMutex;
     ThreadIdentifier m_openingThread;
 
-    DeprecatedMutex m_databaseClosingMutex;
+    Mutex m_databaseClosingMutex;
 
     int m_openError;
     CString m_openErrorMessage;
index e5e3c07..7e094b8 100644 (file)
@@ -59,7 +59,7 @@ int SQLiteStatement::prepare()
 {
     ASSERT(!m_isPrepared);
 
-    DeprecatedMutexLocker databaseLock(m_database.databaseMutex());
+    MutexLocker databaseLock(m_database.databaseMutex());
 
     CString query = m_query.stripWhiteSpace().utf8();
     
@@ -86,7 +86,7 @@ int SQLiteStatement::prepare()
 
 int SQLiteStatement::step()
 {
-    DeprecatedMutexLocker databaseLock(m_database.databaseMutex());
+    MutexLocker databaseLock(m_database.databaseMutex());
 
     if (!m_statement)
         return SQLITE_OK;
index e7510b3..e515552 100644 (file)
@@ -122,7 +122,7 @@ WorkerThread::~WorkerThread()
 bool WorkerThread::start()
 {
     // Mutex protection is necessary to ensure that m_threadID is initialized when the thread starts.
-    DeprecatedMutexLocker lock(m_threadCreationMutex);
+    MutexLocker lock(m_threadCreationMutex);
 
     if (m_threadID)
         return true;
@@ -145,7 +145,7 @@ void WorkerThread::workerThread()
 #endif
 
     {
-        DeprecatedMutexLocker lock(m_threadCreationMutex);
+        MutexLocker lock(m_threadCreationMutex);
         m_workerGlobalScope = createWorkerGlobalScope(m_startupData->m_scriptURL, m_startupData->m_userAgent, m_startupData->m_contentSecurityPolicy, m_startupData->m_contentSecurityPolicyType, m_startupData->m_topOrigin.release());
 
         if (m_runLoop.terminated()) {
@@ -189,7 +189,7 @@ void WorkerThread::runEventLoop()
 void WorkerThread::stop()
 {
     // Mutex protection is necessary because stop() can be called before the context is fully created.
-    DeprecatedMutexLocker lock(m_threadCreationMutex);
+    MutexLocker lock(m_threadCreationMutex);
 
     // Ensure that tasks are being handled by thread event loop. If script execution weren't forbidden, a while(1) loop in JS could keep the thread alive forever.
     if (m_workerGlobalScope) {
index 5e48182..41ea3b0 100644 (file)
@@ -89,7 +89,7 @@ namespace WebCore {
         WorkerReportingProxy& m_workerReportingProxy;
 
         RefPtr<WorkerGlobalScope> m_workerGlobalScope;
-        DeprecatedMutex m_threadCreationMutex;
+        Mutex m_threadCreationMutex;
 
         std::unique_ptr<WorkerThreadStartupData> m_startupData;
 
index b96c0e6..6d76973 100644 (file)
@@ -1,3 +1,30 @@
+2015-08-05  Filip Pizlo  <fpizlo@apple.com>
+
+        Unreviewed, roll out http://trac.webkit.org/changeset/187972.
+
+        * 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:
+
 2015-08-05  Alex Christensen  <achristensen@webkit.org>
 
         Build DumpRenderTree with CMake.
index ec606af..ba17f18 100644 (file)
@@ -164,7 +164,7 @@ void StorageAreaSync::syncTimerFired()
 
     bool partialSync = false;
     {
-        DeprecatedMutexLocker locker(m_syncLock);
+        MutexLocker locker(m_syncLock);
 
         // Do not schedule another sync if we're still trying to complete the
         // previous one. But, if we're shutting down, schedule it anyway.
@@ -352,7 +352,7 @@ void StorageAreaSync::performImport()
 
 void StorageAreaSync::markImported()
 {
-    DeprecatedMutexLocker locker(m_importLock);
+    MutexLocker locker(m_importLock);
     m_importComplete = true;
     m_importCondition.signal();
 }
@@ -372,7 +372,7 @@ void StorageAreaSync::blockUntilImportComplete()
     if (!m_storageArea)
         return;
 
-    DeprecatedMutexLocker locker(m_importLock);
+    MutexLocker locker(m_importLock);
     while (!m_importComplete)
         m_importCondition.wait(m_importLock);
     m_storageArea = nullptr;
@@ -467,7 +467,7 @@ void StorageAreaSync::performSync()
     bool clearItems;
     HashMap<String, String> items;
     {
-        DeprecatedMutexLocker locker(m_syncLock);
+        MutexLocker locker(m_syncLock);
 
         ASSERT(m_syncScheduled);
 
@@ -482,7 +482,7 @@ void StorageAreaSync::performSync()
     sync(clearItems, items);
 
     {
-        DeprecatedMutexLocker locker(m_syncLock);
+        MutexLocker locker(m_syncLock);
         m_syncInProgress = false;
     }
 
index bb704fa..8fbf75b 100644 (file)
@@ -85,7 +85,7 @@ private:
 
     const String m_databaseIdentifier;
 
-    DeprecatedMutex m_syncLock;
+    Mutex m_syncLock;
     HashMap<String, String> m_itemsPendingSync;
     bool m_clearItemsWhileSyncing;
     bool m_syncScheduled;
@@ -94,7 +94,7 @@ private:
 
     bool m_syncCloseDatabase;
 
-    mutable DeprecatedMutex m_importLock;
+    mutable Mutex m_importLock;
     ThreadCondition m_importCondition;
     bool m_importComplete;
     void markImported();
index 1a9a46e..9fc09ba 100644 (file)
@@ -100,7 +100,7 @@ StorageTracker::StorageTracker(const String& storagePath)
 
 void StorageTracker::setDatabaseDirectoryPath(const String& path)
 {
-    DeprecatedMutexLocker locker(m_databaseMutex);
+    MutexLocker locker(m_databaseMutex);
 
     if (m_database.isOpen())
         m_database.close();
@@ -108,7 +108,7 @@ void StorageTracker::setDatabaseDirectoryPath(const String& path)
     m_storageDirectoryPath = path.isolatedCopy();
 
     {
-        DeprecatedMutexLocker locker(m_originSetMutex);
+        MutexLocker locker(m_originSetMutex);
         m_originSet.clear();
     }
 
@@ -185,7 +185,7 @@ void StorageTracker::importOriginIdentifiers()
 
 void StorageTracker::finishedImportingOriginIdentifiers()
 {
-    DeprecatedMutexLocker locker(m_databaseMutex);
+    MutexLocker locker(m_databaseMutex);
     if (m_client)
         m_client->didFinishLoadingOrigins();
 }
@@ -197,7 +197,7 @@ void StorageTracker::syncImportOriginIdentifiers()
     ASSERT(!isMainThread());
 
     {
-        DeprecatedMutexLocker locker(m_databaseMutex);
+        MutexLocker locker(m_databaseMutex);
 
         // Don't force creation of StorageTracker's db just because a tracker
         // was initialized. It will be created if local storage dbs are found
@@ -217,7 +217,7 @@ void StorageTracker::syncImportOriginIdentifiers()
             int result;
             
             {
-                DeprecatedMutexLocker lockOrigins(m_originSetMutex);
+                MutexLocker lockOrigins(m_originSetMutex);
                 while ((result = statement.step()) == SQLITE_ROW)
                     m_originSet.add(statement.getColumnText(0).isolatedCopy());
             }
@@ -232,10 +232,10 @@ void StorageTracker::syncImportOriginIdentifiers()
     syncFileSystemAndTrackerDatabase();
     
     {
-        DeprecatedMutexLocker locker(m_clientMutex);
+        MutexLocker locker(m_clientMutex);
 
         if (m_client) {
-            DeprecatedMutexLocker locker(m_originSetMutex);
+            MutexLocker locker(m_originSetMutex);
             OriginSet::const_iterator end = m_originSet.end();
             for (OriginSet::const_iterator it = m_originSet.begin(); it != end; ++it)
                 m_client->dispatchDidModifyOrigin(*it);
@@ -257,7 +257,7 @@ void StorageTracker::syncFileSystemAndTrackerDatabase()
 
     Vector<String> paths;
     {
-        DeprecatedMutexLocker locker(m_databaseMutex);
+        MutexLocker locker(m_databaseMutex);
         paths = listDirectory(m_storageDirectoryPath, "*.localstorage");
     }
 
@@ -265,7 +265,7 @@ void StorageTracker::syncFileSystemAndTrackerDatabase()
     // deletions from disk and from m_originSet.
     OriginSet originSetCopy;
     {
-        DeprecatedMutexLocker locker(m_originSetMutex);
+        MutexLocker locker(m_originSetMutex);
         for (OriginSet::const_iterator it = m_originSet.begin(), end = m_originSet.end(); it != end; ++it)
             originSetCopy.add((*it).isolatedCopy());
     }
@@ -306,7 +306,7 @@ void StorageTracker::setOriginDetails(const String& originIdentifier, const Stri
         return;
 
     {
-        DeprecatedMutexLocker locker(m_originSetMutex);
+        MutexLocker locker(m_originSetMutex);
 
         if (m_originSet.contains(originIdentifier))
             return;
@@ -337,7 +337,7 @@ void StorageTracker::syncSetOriginDetails(const String& originIdentifier, const
 
     SQLiteTransactionInProgressAutoCounter transactionCounter;
 
-    DeprecatedMutexLocker locker(m_databaseMutex);
+    MutexLocker locker(m_databaseMutex);
 
     openTrackerDatabase(true);
     
@@ -357,13 +357,13 @@ void StorageTracker::syncSetOriginDetails(const String& originIdentifier, const
         LOG_ERROR("Unable to establish origin '%s' in the tracker", originIdentifier.ascii().data());
 
     {
-        DeprecatedMutexLocker locker(m_originSetMutex);
+        MutexLocker locker(m_originSetMutex);
         if (!m_originSet.contains(originIdentifier))
             m_originSet.add(originIdentifier);
     }
 
     {
-        DeprecatedMutexLocker locker(m_clientMutex);
+        MutexLocker locker(m_clientMutex);
         if (m_client)
             m_client->dispatchDidModifyOrigin(originIdentifier);
     }
@@ -376,7 +376,7 @@ void StorageTracker::origins(Vector<RefPtr<SecurityOrigin>>& result)
     if (!m_isActive)
         return;
 
-    DeprecatedMutexLocker locker(m_originSetMutex);
+    MutexLocker locker(m_originSetMutex);
 
     for (OriginSet::const_iterator it = m_originSet.begin(), end = m_originSet.end(); it != end; ++it)
         result.append(SecurityOrigin::createFromDatabaseIdentifier(*it));
@@ -392,7 +392,7 @@ void StorageTracker::deleteAllOrigins()
         return;
 
     {
-        DeprecatedMutexLocker locker(m_originSetMutex);
+        MutexLocker locker(m_originSetMutex);
         willDeleteAllOrigins();
         m_originSet.clear();
     }
@@ -417,7 +417,7 @@ void StorageTracker::syncDeleteAllOrigins()
 
     SQLiteTransactionInProgressAutoCounter transactionCounter;
     
-    DeprecatedMutexLocker locker(m_databaseMutex);
+    MutexLocker locker(m_databaseMutex);
     
     openTrackerDatabase(false);
     if (!m_database.isOpen())
@@ -437,7 +437,7 @@ void StorageTracker::syncDeleteAllOrigins()
         deleteFile(statement.getColumnText(1));
 
         {
-            DeprecatedMutexLocker locker(m_clientMutex);
+            MutexLocker locker(m_clientMutex);
             if (m_client)
                 m_client->dispatchDidModifyOrigin(statement.getColumnText(0));
         }
@@ -499,7 +499,7 @@ void StorageTracker::deleteOrigin(SecurityOrigin* origin)
     String originId = origin->databaseIdentifier();
     
     {
-        DeprecatedMutexLocker locker(m_originSetMutex);
+        MutexLocker locker(m_originSetMutex);
         willDeleteOrigin(originId);
         m_originSet.remove(originId);
     }
@@ -516,7 +516,7 @@ void StorageTracker::syncDeleteOrigin(const String& originIdentifier)
 
     SQLiteTransactionInProgressAutoCounter transactionCounter;
 
-    DeprecatedMutexLocker locker(m_databaseMutex);
+    MutexLocker locker(m_databaseMutex);
     
     if (!canDeleteOrigin(originIdentifier)) {
         LOG_ERROR("Attempted to delete origin '%s' while it was being created\n", originIdentifier.ascii().data());
@@ -549,7 +549,7 @@ void StorageTracker::syncDeleteOrigin(const String& originIdentifier)
     
     bool shouldDeleteTrackerFiles = false;
     {
-        DeprecatedMutexLocker locker(m_originSetMutex);
+        MutexLocker locker(m_originSetMutex);
         m_originSet.remove(originIdentifier);
         shouldDeleteTrackerFiles = m_originSet.isEmpty();
     }
@@ -566,7 +566,7 @@ void StorageTracker::syncDeleteOrigin(const String& originIdentifier)
     }
 
     {
-        DeprecatedMutexLocker locker(m_clientMutex);
+        MutexLocker locker(m_clientMutex);
         if (m_client)
             m_client->dispatchDidModifyOrigin(originIdentifier);
     }
@@ -592,7 +592,7 @@ void StorageTracker::willDeleteOrigin(const String& originIdentifier)
 bool StorageTracker::canDeleteOrigin(const String& originIdentifier)
 {
     ASSERT(!m_databaseMutex.tryLock());
-    DeprecatedMutexLocker locker(m_originSetMutex);
+    MutexLocker locker(m_originSetMutex);
     return m_originsBeingDeleted.contains(originIdentifier);
 }
 
@@ -601,9 +601,9 @@ void StorageTracker::cancelDeletingOrigin(const String& originIdentifier)
     if (!m_isActive)
         return;
 
-    DeprecatedMutexLocker locker(m_databaseMutex);
+    MutexLocker locker(m_databaseMutex);
     {
-        DeprecatedMutexLocker locker(m_originSetMutex);
+        MutexLocker locker(m_originSetMutex);
         if (!m_originsBeingDeleted.isEmpty())
             m_originsBeingDeleted.remove(originIdentifier);
     }
@@ -647,7 +647,7 @@ long long StorageTracker::diskUsageForOrigin(SecurityOrigin* origin)
     if (!m_isActive)
         return 0;
 
-    DeprecatedMutexLocker locker(m_databaseMutex);
+    MutexLocker locker(m_databaseMutex);
 
     String path = databasePathForOrigin(origin->databaseIdentifier());
     if (path.isEmpty())
index 80bfc64..a770593 100644 (file)
@@ -95,15 +95,15 @@ private:
     void syncImportOriginIdentifiers();
 
     // Mutex for m_database and m_storageDirectoryPath.
-    DeprecatedMutex m_databaseMutex;
+    Mutex m_databaseMutex;
     SQLiteDatabase m_database;
     String m_storageDirectoryPath;
 
-    DeprecatedMutex m_clientMutex;
+    Mutex m_clientMutex;
     StorageTrackerClient* m_client;
 
     // Guard for m_originSet and m_originsBeingDeleted.
-    DeprecatedMutex m_originSetMutex;
+    Mutex m_originSetMutex;
     typedef HashSet<String> OriginSet;
     OriginSet m_originSet;
     OriginSet m_originsBeingDeleted;
index d36bde1..d4e4516 100644 (file)
@@ -1,3 +1,15 @@
+2015-08-05  Filip Pizlo  <fpizlo@apple.com>
+
+        Unreviewed, roll out http://trac.webkit.org/changeset/187972.
+
+        * WebCoreSupport/WebFixedPositionContent.mm:
+        (WebFixedPositionContentDataLock):
+        (-[WebFixedPositionContent scrollOrZoomChanged:]):
+        (-[WebFixedPositionContent overflowScrollPositionForLayer:changedTo:]):
+        (-[WebFixedPositionContent setViewportConstrainedLayers:stickyContainerMap:]):
+        (-[WebFixedPositionContent hasFixedOrStickyPositionLayers]):
+        (-[WebFixedPositionContent minimumOffsetFromFixedPositionLayersToAnchorEdge:ofRect:inLayer:]):
+
 2015-08-04  Filip Pizlo  <fpizlo@apple.com>
 
         Rename Mutex to DeprecatedMutex
index a71b445..f8b610b 100644 (file)
@@ -48,9 +48,9 @@
 using namespace WebCore;
 using namespace std;
 
-static DeprecatedMutex& WebFixedPositionContentDataLock()
+static Mutex& WebFixedPositionContentDataLock()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, mutex, ());
+    DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, mutex, ());
     return mutex;
 }
 
@@ -101,7 +101,7 @@ WebFixedPositionContentData::~WebFixedPositionContentData()
 
 - (void)scrollOrZoomChanged:(CGRect)positionedObjectsRect
 {
-    DeprecatedMutexLocker lock(WebFixedPositionContentDataLock());
+    MutexLocker lock(WebFixedPositionContentDataLock());
 
     LayerInfoMap::const_iterator end = _private->m_viewportConstrainedLayers.end();
     for (LayerInfoMap::const_iterator it = _private->m_viewportConstrainedLayers.begin(); it != end; ++it) {
@@ -140,7 +140,7 @@ WebFixedPositionContentData::~WebFixedPositionContentData()
 
 - (void)overflowScrollPositionForLayer:(CALayer *)scrollLayer changedTo:(CGPoint)scrollPosition
 {
-    DeprecatedMutexLocker lock(WebFixedPositionContentDataLock());
+    MutexLocker lock(WebFixedPositionContentDataLock());
 
     LayerInfoMap::const_iterator end = _private->m_viewportConstrainedLayers.end();
     for (LayerInfoMap::const_iterator it = _private->m_viewportConstrainedLayers.begin(); it != end; ++it) {
@@ -173,7 +173,7 @@ WebFixedPositionContentData::~WebFixedPositionContentData()
 
 - (void)setViewportConstrainedLayers:(WTF::HashMap<CALayer *, std::unique_ptr<WebCore::ViewportConstraints>>&)layerMap stickyContainerMap:(WTF::HashMap<CALayer*, CALayer*>&)stickyContainers
 {
-    DeprecatedMutexLocker lock(WebFixedPositionContentDataLock());
+    MutexLocker lock(WebFixedPositionContentDataLock());
 
     _private->m_viewportConstrainedLayers.clear();
 
@@ -190,7 +190,7 @@ WebFixedPositionContentData::~WebFixedPositionContentData()
 
 - (BOOL)hasFixedOrStickyPositionLayers
 {
-    DeprecatedMutexLocker lock(WebFixedPositionContentDataLock());
+    MutexLocker lock(WebFixedPositionContentDataLock());
     return !_private->m_viewportConstrainedLayers.isEmpty();
 }
 
@@ -210,7 +210,7 @@ static ViewportConstraints::AnchorEdgeFlags anchorEdgeFlagsForAnchorEdge(WebFixe
 
 - (CGFloat)minimumOffsetFromFixedPositionLayersToAnchorEdge:(WebFixedPositionAnchorEdge)anchorEdge ofRect:(CGRect)rect inLayer:(CALayer *)layer
 {
-    DeprecatedMutexLocker lock(WebFixedPositionContentDataLock());
+    MutexLocker lock(WebFixedPositionContentDataLock());
     ViewportConstraints::AnchorEdgeFlags anchorEdgeFlags = anchorEdgeFlagsForAnchorEdge(anchorEdge);
     CGFloat minimumOffset = CGFLOAT_MAX;
     LayerInfoMap::const_iterator end = _private->m_viewportConstrainedLayers.end();
index dd8440e..37a7e94 100644 (file)
@@ -1,3 +1,18 @@
+2015-08-05  Filip Pizlo  <fpizlo@apple.com>
+
+        Unreviewed, roll out http://trac.webkit.org/changeset/187972.
+
+        * Storage/WebDatabaseManager.mm:
+        (transactionBackgroundTaskIdentifierLock):
+        (+[WebDatabaseManager startBackgroundTask]):
+        (+[WebDatabaseManager endBackgroundTask]):
+        * WebView/WebView.mm:
+        (-[WebView _synchronizeCustomFixedPositionLayoutRect]):
+        (-[WebView _setCustomFixedPositionLayoutRectInWebThread:synchronize:]):
+        (-[WebView _setCustomFixedPositionLayoutRect:]):
+        (-[WebView _fetchCustomFixedPositionLayoutRect:]):
+        * WebView/WebViewData.h:
+
 2015-08-04  Filip Pizlo  <fpizlo@apple.com>
 
         Rename Mutex to DeprecatedMutex
index ac12b14..aa23608 100644 (file)
@@ -226,9 +226,9 @@ static bool isFileHidden(NSString *file)
 #if PLATFORM(IOS)
 @implementation WebDatabaseManager (WebDatabaseManagerInternal)
 
-static DeprecatedMutex& transactionBackgroundTaskIdentifierLock()
+static Mutex& transactionBackgroundTaskIdentifierLock()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, mutex, ());
+    DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, mutex, ());
     return mutex;
 }
 
@@ -261,7 +261,7 @@ static WebBackgroundTaskIdentifier getTransactionBackgroundTaskIdentifier()
 
 + (void)startBackgroundTask
 {
-    DeprecatedMutexLocker lock(transactionBackgroundTaskIdentifierLock());
+    MutexLocker lock(transactionBackgroundTaskIdentifierLock());
 
     // If there's already an existing background task going on, there's no need to start a new one.
     if (getTransactionBackgroundTaskIdentifier() != invalidWebBackgroundTaskIdentifier())
@@ -275,7 +275,7 @@ static WebBackgroundTaskIdentifier getTransactionBackgroundTaskIdentifier()
 
 + (void)endBackgroundTask
 {
-    DeprecatedMutexLocker lock(transactionBackgroundTaskIdentifierLock());
+    MutexLocker lock(transactionBackgroundTaskIdentifierLock());
 
     // It is possible that we were unable to start the background task when the first transaction began.
     // Don't try to end the task in that case.
index bf04c3b..6419ddc 100644 (file)
@@ -3632,7 +3632,7 @@ static inline IMP getMethod(id o, SEL s)
 
     IntRect newRect;
     {
-        DeprecatedMutexLocker locker(_private->pendingFixedPositionLayoutRectMutex);
+        MutexLocker locker(_private->pendingFixedPositionLayoutRectMutex);
         if (CGRectIsNull(_private->pendingFixedPositionLayoutRect))
             return;
         newRect = enclosingIntRect(_private->pendingFixedPositionLayoutRect);
@@ -3646,7 +3646,7 @@ static inline IMP getMethod(id o, SEL s)
 - (void)_setCustomFixedPositionLayoutRectInWebThread:(CGRect)rect synchronize:(BOOL)synchronize
 {
     {
-        DeprecatedMutexLocker locker(_private->pendingFixedPositionLayoutRectMutex);
+        MutexLocker locker(_private->pendingFixedPositionLayoutRectMutex);
         _private->pendingFixedPositionLayoutRect = rect;
     }
     if (!synchronize)
@@ -3660,7 +3660,7 @@ static inline IMP getMethod(id o, SEL s)
 {
     ASSERT(WebThreadIsLocked());
     {
-        DeprecatedMutexLocker locker(_private->pendingFixedPositionLayoutRectMutex);
+        MutexLocker locker(_private->pendingFixedPositionLayoutRectMutex);
         _private->pendingFixedPositionLayoutRect = rect;
     }
     [self _synchronizeCustomFixedPositionLayoutRect];
@@ -3668,7 +3668,7 @@ static inline IMP getMethod(id o, SEL s)
 
 - (BOOL)_fetchCustomFixedPositionLayoutRect:(NSRect*)rect
 {
-    DeprecatedMutexLocker locker(_private->pendingFixedPositionLayoutRectMutex);
+    MutexLocker locker(_private->pendingFixedPositionLayoutRectMutex);
     if (CGRectIsNull(_private->pendingFixedPositionLayoutRect))
         return false;
 
index 4c14062..31139b4 100644 (file)
@@ -249,7 +249,7 @@ private:
     CGSize fixedLayoutSize;
     BOOL mainViewIsScrollingOrZooming;
     int32_t didDrawTiles;
-    WTF::DeprecatedMutex pendingFixedPositionLayoutRectMutex;
+    WTF::Mutex pendingFixedPositionLayoutRectMutex;
     CGRect pendingFixedPositionLayoutRect;
 #endif
 
index 9f892c0..32e2dd4 100644 (file)
@@ -1,3 +1,23 @@
+2015-08-05  Filip Pizlo  <fpizlo@apple.com>
+
+        Unreviewed, roll out http://trac.webkit.org/changeset/187972.
+
+        * 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):
+
 2015-08-05  Alex Christensen  <achristensen@webkit.org>
 
         Build DumpRenderTree with CMake.
index 57a6c07..0ed9cce 100644 (file)
@@ -42,7 +42,7 @@ PluginMainThreadScheduler::PluginMainThreadScheduler()
 
 void PluginMainThreadScheduler::scheduleCall(NPP npp, MainThreadFunction function, void* userData)
 {
-    DeprecatedMutexLocker lock(m_queueMutex);
+    MutexLocker lock(m_queueMutex);
 
     CallQueueMap::iterator it = m_callQueueMap.find(npp);
     if (it == m_callQueueMap.end())
@@ -58,7 +58,7 @@ void PluginMainThreadScheduler::scheduleCall(NPP npp, MainThreadFunction functio
 
 void PluginMainThreadScheduler::registerPlugin(NPP npp)
 {
-    DeprecatedMutexLocker lock(m_queueMutex);
+    MutexLocker lock(m_queueMutex);
 
     ASSERT(!m_callQueueMap.contains(npp));
     m_callQueueMap.set(npp, Deque<Call>());
@@ -66,7 +66,7 @@ void PluginMainThreadScheduler::registerPlugin(NPP npp)
 
 void PluginMainThreadScheduler::unregisterPlugin(NPP npp)
 {
-    DeprecatedMutexLocker lock(m_queueMutex);
+    MutexLocker lock(m_queueMutex);
 
     ASSERT(m_callQueueMap.contains(npp));
     m_callQueueMap.remove(npp);
@@ -77,7 +77,7 @@ void PluginMainThreadScheduler::dispatchCallsForPlugin(NPP npp, const Deque<Call
     for (auto& call : calls) {
         // Check if the plug-in has been destroyed.
         {
-            DeprecatedMutexLocker lock(m_queueMutex);
+            MutexLocker lock(m_queueMutex);
             if (!m_callQueueMap.contains(npp))
                 return;
         }
index d6518b9..858e897 100644 (file)
@@ -79,7 +79,7 @@ private:
 
     bool m_callPending;
     CallQueueMap m_callQueueMap;
-    DeprecatedMutex m_queueMutex;
+    Mutex m_queueMutex;
 };
 
 } // namespace WebCore
index 4a2dfc1..a5eb827 100644 (file)
@@ -320,14 +320,14 @@ HBITMAP WebIconDatabase::getOrCreateDefaultIconBitmap(const IntSize& size)
 void WebIconDatabase::didRemoveAllIcons()
 {
     // Queueing the empty string is a special way of saying "this queued notification is the didRemoveAllIcons notification"
-    DeprecatedMutexLocker locker(m_notificationMutex);
+    MutexLocker locker(m_notificationMutex);
     m_notificationQueue.append(String());
     scheduleNotificationDelivery();
 }
 
 void WebIconDatabase::didImportIconURLForPageURL(const WTF::String& pageURL)
 {
-    DeprecatedMutexLocker locker(m_notificationMutex);
+    MutexLocker locker(m_notificationMutex);
     m_notificationQueue.append(pageURL.isolatedCopy());
     scheduleNotificationDelivery();
 }
@@ -403,7 +403,7 @@ void WebIconDatabase::deliverNotifications(void*)
 
     Vector<String> queue;
     {
-        DeprecatedMutexLocker locker(m_sharedWebIconDatabase->m_notificationMutex);
+        MutexLocker locker(m_sharedWebIconDatabase->m_notificationMutex);
         queue.swap(m_sharedWebIconDatabase->m_notificationQueue);
         m_sharedWebIconDatabase->m_deliveryRequested = false;
     }
index 8c3ef81..c5cf29d 100644 (file)
@@ -44,9 +44,9 @@ WebLocalizableStringsBundle WebKitLocalizableStringsBundle = { "com.apple.WebKit
 
 typedef HashMap<String, LocalizedString*> LocalizedStringMap;
 
-static DeprecatedMutex& mainBundleLocStringsMutex()
+static Mutex& mainBundleLocStringsMutex()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, mutex, ());
+    DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, mutex, ());
     return mutex;
 }
 
@@ -56,9 +56,9 @@ static LocalizedStringMap& mainBundleLocStrings()
     return map;
 }
 
-static DeprecatedMutex& frameworkLocStringsMutex()
+static Mutex& frameworkLocStringsMutex()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, mutex, ());
+    DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, mutex, ());
     return mutex;
 }
 
@@ -175,12 +175,12 @@ static CFStringRef copyLocalizedStringFromBundle(WebLocalizableStringsBundle* st
 static LocalizedString* findCachedString(WebLocalizableStringsBundle* stringsBundle, const String& key)
 {
     if (!stringsBundle) {
-        DeprecatedMutexLocker lock(mainBundleLocStringsMutex());
+        MutexLocker lock(mainBundleLocStringsMutex());
         return mainBundleLocStrings().get(key);
     }
 
     if (stringsBundle->bundle == WebKitLocalizableStringsBundle.bundle) {
-        DeprecatedMutexLocker lock(frameworkLocStringsMutex());
+        MutexLocker lock(frameworkLocStringsMutex());
         return frameworkLocStrings().get(key);
     }
 
@@ -190,12 +190,12 @@ static LocalizedString* findCachedString(WebLocalizableStringsBundle* stringsBun
 static void cacheString(WebLocalizableStringsBundle* stringsBundle, const String& key, LocalizedString* value)
 {
     if (!stringsBundle) {
-        DeprecatedMutexLocker lock(mainBundleLocStringsMutex());
+        MutexLocker lock(mainBundleLocStringsMutex());
         mainBundleLocStrings().set(key, value);
         return;
     }
 
-    DeprecatedMutexLocker lock(frameworkLocStringsMutex());
+    MutexLocker lock(frameworkLocStringsMutex());
     frameworkLocStrings().set(key, value);
 }
 
index 564b962..69ed296 100644 (file)
@@ -1,3 +1,56 @@
+2015-08-05  Filip Pizlo  <fpizlo@apple.com>
+
+        Unreviewed, roll out http://trac.webkit.org/changeset/187972.
+
+        * 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):
+
 2015-08-05  Ryosuke Niwa  <rniwa@webkit.org>
 
         WebInspectorProxy should make WKWebView first responder
index d093d64..61653ca 100644 (file)
@@ -151,7 +151,7 @@ void DatabaseProcess::postDatabaseTask(std::unique_ptr<AsyncTask> task)
 {
     ASSERT(RunLoop::isMain());
 
-    DeprecatedMutexLocker locker(m_databaseTaskMutex);
+    MutexLocker locker(m_databaseTaskMutex);
 
     m_databaseTasks.append(WTF::move(task));
 
@@ -166,7 +166,7 @@ void DatabaseProcess::performNextDatabaseTask()
 
     std::unique_ptr<AsyncTask> task;
     {
-        DeprecatedMutexLocker locker(m_databaseTaskMutex);
+        MutexLocker locker(m_databaseTaskMutex);
         ASSERT(!m_databaseTasks.isEmpty());
         task = m_databaseTasks.takeFirst();
     }
index ba5698b..47c6925 100644 (file)
@@ -106,7 +106,7 @@ private:
     HashMap<UniqueIDBDatabaseIdentifier, RefPtr<UniqueIDBDatabase>> m_idbDatabases;
 
     Deque<std::unique_ptr<AsyncTask>> m_databaseTasks;
-    DeprecatedMutex m_databaseTaskMutex;
+    Mutex m_databaseTaskMutex;
 };
 
 } // namespace WebKit
index f93f4d8..3d2ca5b 100644 (file)
@@ -136,7 +136,7 @@ void UniqueIDBDatabase::shutdown(UniqueIDBDatabaseShutdownType type)
     ref();
 
     {
-        DeprecatedMutexLocker locker(m_databaseTaskMutex);
+        MutexLocker locker(m_databaseTaskMutex);
         m_databaseTasks.clear();
     }
 
@@ -1125,7 +1125,7 @@ void UniqueIDBDatabase::postMainThreadTask(std::unique_ptr<AsyncTask> task, Data
     if (!m_acceptingNewRequests && taskType == DatabaseTaskType::Normal)
         return;
 
-    DeprecatedMutexLocker locker(m_mainThreadTaskMutex);
+    MutexLocker locker(m_mainThreadTaskMutex);
 
     m_mainThreadTasks.append(WTF::move(task));
 
@@ -1143,7 +1143,7 @@ bool UniqueIDBDatabase::performNextMainThreadTask()
 
     std::unique_ptr<AsyncTask> task;
     {
-        DeprecatedMutexLocker locker(m_mainThreadTaskMutex);
+        MutexLocker locker(m_mainThreadTaskMutex);
 
         // This database might be shutting down, in which case the task queue might be empty.
         if (m_mainThreadTasks.isEmpty())
@@ -1165,7 +1165,7 @@ void UniqueIDBDatabase::postDatabaseTask(std::unique_ptr<AsyncTask> task, Databa
     if (!m_acceptingNewRequests && taskType == DatabaseTaskType::Normal)
         return;
 
-    DeprecatedMutexLocker locker(m_databaseTaskMutex);
+    MutexLocker locker(m_databaseTaskMutex);
 
     m_databaseTasks.append(WTF::move(task));
 
@@ -1186,7 +1186,7 @@ void UniqueIDBDatabase::performNextDatabaseTask()
 
     std::unique_ptr<AsyncTask> task;
     {
-        DeprecatedMutexLocker locker(m_databaseTaskMutex);
+        MutexLocker locker(m_databaseTaskMutex);
 
         // This database might be shutting down on the main thread, in which case the task queue might be empty.
         if (m_databaseTasks.isEmpty())
index 3cdeb7e..a204259 100644 (file)
@@ -210,10 +210,10 @@ private:
     RefPtr<UniqueIDBDatabaseBackingStore> m_backingStore;
 
     Deque<std::unique_ptr<AsyncTask>> m_databaseTasks;
-    DeprecatedMutex m_databaseTaskMutex;
+    Mutex m_databaseTaskMutex;
 
     Deque<std::unique_ptr<AsyncTask>> m_mainThreadTasks;
-    DeprecatedMutex m_mainThreadTaskMutex;
+    Mutex m_mainThreadTaskMutex;
 };
 
 } // namespace WebKit
index 4aa8b9b..07a93b5 100644 (file)
@@ -459,7 +459,7 @@ std::unique_ptr<MessageDecoder> Connection::sendSyncMessage(uint64_t syncRequest
 
     // Push the pending sync reply information on our stack.
     {
-        DeprecatedMutexLocker locker(m_syncReplyStateMutex);
+        MutexLocker locker(m_syncReplyStateMutex);
         if (!m_shouldWaitForSyncReplies) {
             didFailToSendSyncMessage();
             return nullptr;
@@ -486,7 +486,7 @@ std::unique_ptr<MessageDecoder> Connection::sendSyncMessage(uint64_t syncRequest
 
     // Finally, pop the pending sync reply information.
     {
-        DeprecatedMutexLocker locker(m_syncReplyStateMutex);
+        MutexLocker locker(m_syncReplyStateMutex);
         ASSERT(m_pendingSyncReplies.last().syncRequestID == syncRequestID);
         m_pendingSyncReplies.removeLast();
     }
@@ -508,7 +508,7 @@ std::unique_ptr<MessageDecoder> Connection::sendSyncMessageFromSecondaryThread(u
 
     // Push the pending sync reply information on our stack.
     {
-        DeprecatedMutexLocker locker(m_syncReplyStateMutex);
+        MutexLocker locker(m_syncReplyStateMutex);
         if (!m_shouldWaitForSyncReplies)
             return nullptr;
 
@@ -526,7 +526,7 @@ std::unique_ptr<MessageDecoder> Connection::sendSyncMessageFromSecondaryThread(u
 
     // Finally, pop the pending sync reply information.
     {
-        DeprecatedMutexLocker locker(m_syncReplyStateMutex);
+        MutexLocker locker(m_syncReplyStateMutex);
         ASSERT(m_secondaryThreadPendingSyncReplyMap.contains(syncRequestID));
         m_secondaryThreadPendingSyncReplyMap.remove(syncRequestID);
     }
@@ -546,7 +546,7 @@ std::unique_ptr<MessageDecoder> Connection::waitForSyncReply(uint64_t syncReques
         SyncMessageState::singleton().dispatchMessages(nullptr);
         
         {
-            DeprecatedMutexLocker locker(m_syncReplyStateMutex);
+            MutexLocker locker(m_syncReplyStateMutex);
 
             // Second, check if there is a sync reply at the top of the stack.
             ASSERT(!m_pendingSyncReplies.isEmpty());
@@ -592,7 +592,7 @@ std::unique_ptr<MessageDecoder> Connection::waitForSyncReply(uint64_t syncReques
 
 void Connection::processIncomingSyncReply(std::unique_ptr<MessageDecoder> decoder)
 {
-    DeprecatedMutexLocker locker(m_syncReplyStateMutex);
+    MutexLocker locker(m_syncReplyStateMutex);
 
     // Go through the stack of sync requests that have pending replies and see which one
     // this reply is for.
@@ -750,7 +750,7 @@ void Connection::connectionDidClose()
     platformInvalidate();
 
     {
-        DeprecatedMutexLocker locker(m_syncReplyStateMutex);
+        MutexLocker locker(m_syncReplyStateMutex);
 
         ASSERT(m_shouldWaitForSyncReplies);
         m_shouldWaitForSyncReplies = false;
index 640a9a6..8d77cce 100644 (file)
@@ -298,7 +298,7 @@ private:
     class SyncMessageState;
     friend class SyncMessageState;
 
-    DeprecatedMutex m_syncReplyStateMutex;
+    Mutex m_syncReplyStateMutex;
     bool m_shouldWaitForSyncReplies;
     Vector<PendingSyncReply> m_pendingSyncReplies;
 
index 39642bd..3b3fc77 100644 (file)
@@ -690,7 +690,7 @@ void CoordinatedGraphicsScene::appendUpdate(std::function<void()> function)
         return;
 
     ASSERT(isMainThread());
-    DeprecatedMutexLocker locker(m_renderQueueMutex);
+    MutexLocker locker(m_renderQueueMutex);
     m_renderQueue.append(WTF::move(function));
 }
 
index ab90c85..f71719c 100644 (file)
@@ -145,7 +145,7 @@ private:
 
     // Render queue can be accessed ony from main thread or updatePaintNode call stack!
     Vector<std::function<void()>> m_renderQueue;
-    DeprecatedMutex m_renderQueueMutex;
+    Mutex m_renderQueueMutex;
 
     std::unique_ptr<WebCore::TextureMapper> m_textureMapper;
 
index 1e58928..c3bae6d 100644 (file)
@@ -295,7 +295,7 @@ void ThreadedCompositor::createCompositingThread()
     if (m_threadIdentifier)
         return;
 
-    DeprecatedMutexLocker locker(m_initializeRunLoopConditionMutex);
+    MutexLocker locker(m_initializeRunLoopConditionMutex);
     m_threadIdentifier = createThread(compositingThreadEntry, this, "WebCore: ThreadedCompositor");
 
     m_initializeRunLoopCondition.wait(m_initializeRunLoopConditionMutex);
@@ -304,7 +304,7 @@ void ThreadedCompositor::createCompositingThread()
 void ThreadedCompositor::runCompositingThread()
 {
     {
-        DeprecatedMutexLocker locker(m_initializeRunLoopConditionMutex);
+        MutexLocker locker(m_initializeRunLoopConditionMutex);
 
         m_compositingRunLoop = std::make_unique<CompositingRunLoop>([&] {
             renderLayerTree();
@@ -321,7 +321,7 @@ void ThreadedCompositor::runCompositingThread()
     m_scene->purgeGLResources();
 
     {
-        DeprecatedMutexLocker locker(m_terminateRunLoopConditionMutex);
+        MutexLocker locker(m_terminateRunLoopConditionMutex);
         m_compositingRunLoop = nullptr;
         m_context = nullptr;
         m_terminateRunLoopCondition.signal();
@@ -332,7 +332,7 @@ void ThreadedCompositor::runCompositingThread()
 
 void ThreadedCompositor::terminateCompositingThread()
 {
-    DeprecatedMutexLocker locker(m_terminateRunLoopConditionMutex);
+    MutexLocker locker(m_terminateRunLoopConditionMutex);
 
     m_scene->detach();
     m_compositingRunLoop->runLoop().stop();
index 6643b00..0d785ef 100644 (file)
@@ -111,9 +111,9 @@ private:
 
     ThreadIdentifier m_threadIdentifier;
     ThreadCondition m_initializeRunLoopCondition;
-    DeprecatedMutex m_initializeRunLoopConditionMutex;
+    Mutex m_initializeRunLoopConditionMutex;
     ThreadCondition m_terminateRunLoopCondition;
-    DeprecatedMutex m_terminateRunLoopConditionMutex;
+    Mutex m_terminateRunLoopConditionMutex;
 };
 
 } // namespace WebKit
index 56d7961..dd63a11 100644 (file)
@@ -165,28 +165,28 @@ void CustomProtocolManager::initialize(const NetworkProcessCreationParameters& p
 void CustomProtocolManager::addCustomProtocol(WKCustomProtocol *customProtocol)
 {
     ASSERT(customProtocol);
-    DeprecatedMutexLocker locker(m_customProtocolMapMutex);
+    MutexLocker locker(m_customProtocolMapMutex);
     m_customProtocolMap.add(customProtocol.customProtocolID, customProtocol);
 }
 
 void CustomProtocolManager::removeCustomProtocol(WKCustomProtocol *customProtocol)
 {
     ASSERT(customProtocol);
-    DeprecatedMutexLocker locker(m_customProtocolMapMutex);
+    MutexLocker locker(m_customProtocolMapMutex);
     m_customProtocolMap.remove(customProtocol.customProtocolID);
 }
     
 void CustomProtocolManager::registerScheme(const String& scheme)
 {
     ASSERT(!scheme.isNull());
-    DeprecatedMutexLocker locker(m_registeredSchemesMutex);
+    MutexLocker locker(m_registeredSchemesMutex);
     m_registeredSchemes.add(scheme);
 }
     
 void CustomProtocolManager::unregisterScheme(const String& scheme)
 {
     ASSERT(!scheme.isNull());
-    DeprecatedMutexLocker locker(m_registeredSchemesMutex);
+    MutexLocker locker(m_registeredSchemesMutex);
     m_registeredSchemes.remove(scheme);
 }
 
@@ -195,7 +195,7 @@ bool CustomProtocolManager::supportsScheme(const String& scheme)
     if (scheme.isNull())
         return false;
 
-    DeprecatedMutexLocker locker(m_registeredSchemesMutex);
+    MutexLocker locker(m_registeredSchemesMutex);
     return m_registeredSchemes.contains(scheme);
 }
 
@@ -261,7 +261,7 @@ void CustomProtocolManager::didFinishLoading(uint64_t customProtocolID)
 
 RetainPtr<WKCustomProtocol> CustomProtocolManager::protocolForID(uint64_t customProtocolID)
 {
-    DeprecatedMutexLocker locker(m_customProtocolMapMutex);
+    MutexLocker locker(m_customProtocolMapMutex);
 
     CustomProtocolMap::const_iterator it = m_customProtocolMap.find(customProtocolID);
     if (it == m_customProtocolMap.end())
index ecb3fb1..1018043 100644 (file)
@@ -100,11 +100,11 @@ private:
 
 #if PLATFORM(COCOA)
     HashSet<String> m_registeredSchemes;
-    DeprecatedMutex m_registeredSchemesMutex;
+    Mutex m_registeredSchemesMutex;
 
     typedef HashMap<uint64_t, RetainPtr<WKCustomProtocol>> CustomProtocolMap;
     CustomProtocolMap m_customProtocolMap;
-    DeprecatedMutex m_customProtocolMapMutex;
+    Mutex m_customProtocolMapMutex;
     
     // WKCustomProtocol objects can be removed from the m_customProtocolMap from multiple threads.
     // We return a RetainPtr here because it is unsafe to return a raw pointer since the object might immediately be destroyed from a different thread.
index fd342da..8f634ef 100644 (file)
@@ -65,7 +65,7 @@ private:
 
     int m_socket;
 
-    mutable DeprecatedMutex m_socketLock;
+    mutable Mutex m_socketLock;
 
     // Maps files that may be read by malloc() to open file descriptors.
     HashMap<String, int> m_fileDescriptorCache;
index cf4b637..850b237 100644 (file)
@@ -86,7 +86,7 @@ PluginProcessConnection* PluginProcessConnectionManager::getPluginProcessConnect
     m_pluginProcessConnections.append(pluginProcessConnection);
 
     {
-        DeprecatedMutexLocker locker(m_tokensAndConnectionsMutex);
+        MutexLocker locker(m_tokensAndConnectionsMutex);
         ASSERT(!m_tokensAndConnections.contains(pluginProcessToken));
 
         m_tokensAndConnections.set(pluginProcessToken, pluginProcessConnection->connection());
@@ -101,7 +101,7 @@ void PluginProcessConnectionManager::removePluginProcessConnection(PluginProcess
     ASSERT(vectorIndex != notFound);
 
     {
-        DeprecatedMutexLocker locker(m_tokensAndConnectionsMutex);
+        MutexLocker locker(m_tokensAndConnectionsMutex);
         ASSERT(m_tokensAndConnections.contains(pluginProcessConnection->pluginProcessToken()));
         
         m_tokensAndConnections.remove(pluginProcessConnection->pluginProcessToken());
@@ -112,7 +112,7 @@ void PluginProcessConnectionManager::removePluginProcessConnection(PluginProcess
 
 void PluginProcessConnectionManager::pluginProcessCrashed(uint64_t pluginProcessToken)
 {
-    DeprecatedMutexLocker locker(m_tokensAndConnectionsMutex);
+    MutexLocker locker(m_tokensAndConnectionsMutex);
     IPC::Connection* connection = m_tokensAndConnections.get(pluginProcessToken);
 
     // It's OK for connection to be null here; it will happen if this web process doesn't know
index 40569d4..b83266c 100644 (file)
@@ -64,7 +64,7 @@ private:
 
     Vector<RefPtr<PluginProcessConnection>> m_pluginProcessConnections;
 
-    DeprecatedMutex m_tokensAndConnectionsMutex;
+    Mutex m_tokensAndConnectionsMutex;
     HashMap<uint64_t, RefPtr<IPC::Connection>> m_tokensAndConnections;
 };
 
index f457abf..5f3f7c7 100644 (file)
@@ -65,7 +65,7 @@ EventDispatcher::~EventDispatcher()
 #if ENABLE(ASYNC_SCROLLING)
 void EventDispatcher::addScrollingTreeForPage(WebPage* webPage)
 {
-    DeprecatedMutexLocker locker(m_scrollingTreesMutex);
+    MutexLocker locker(m_scrollingTreesMutex);
 
     ASSERT(webPage->corePage()->scrollingCoordinator());
     ASSERT(!m_scrollingTrees.contains(webPage->pageID()));
@@ -76,7 +76,7 @@ void EventDispatcher::addScrollingTreeForPage(WebPage* webPage)
 
 void EventDispatcher::removeScrollingTreeForPage(WebPage* webPage)
 {
-    DeprecatedMutexLocker locker(m_scrollingTreesMutex);
+    MutexLocker locker(m_scrollingTreesMutex);
     ASSERT(m_scrollingTrees.contains(webPage->pageID()));
 
     m_scrollingTrees.remove(webPage->pageID());
@@ -132,7 +132,7 @@ void EventDispatcher::wheelEvent(uint64_t pageID, const WebWheelEvent& wheelEven
 #endif
 
 #if ENABLE(ASYNC_SCROLLING)
-    DeprecatedMutexLocker locker(m_scrollingTreesMutex);
+    MutexLocker locker(m_scrollingTreesMutex);
     if (RefPtr<ThreadedScrollingTree> scrollingTree = m_scrollingTrees.get(pageID)) {
         // FIXME: It's pretty horrible that we're updating the back/forward state here.
         // WebCore should always know the current state and know when it changes so the
index 8ca7ba3..6f74311 100644 (file)
@@ -92,7 +92,7 @@ private:
     Ref<WorkQueue> m_queue;
 
 #if ENABLE(ASYNC_SCROLLING)
-    DeprecatedMutex m_scrollingTreesMutex;
+    Mutex m_scrollingTreesMutex;
     HashMap<uint64_t, RefPtr<WebCore::ThreadedScrollingTree>> m_scrollingTrees;
 #endif
     std::unique_ptr<WebCore::WheelEventDeltaTracker> m_recentWheelEventDeltaTracker;
index 72d7619..04409e1 100644 (file)
@@ -41,7 +41,7 @@ struct _WebKitSoupRequestInputStreamPrivate {
     uint64_t bytesReceived;
     uint64_t bytesRead;
 
-    DeprecatedMutex readLock;
+    Mutex readLock;
     std::unique_ptr<AsyncReadData> pendingAsyncRead;
 };
 
@@ -84,7 +84,7 @@ static void webkitSoupRequestInputStreamReadAsync(GInputStream* inputStream, voi
     WebKitSoupRequestInputStream* stream = WEBKIT_SOUP_REQUEST_INPUT_STREAM(inputStream);
     GRefPtr<GTask> task = adoptGRef(g_task_new(stream, cancellable, callback, userData));
 
-    DeprecatedMutexLocker locker(stream->priv->readLock);
+    MutexLocker locker(stream->priv->readLock);
 
     if (!webkitSoupRequestInputStreamHasDataToRead(stream) && !webkitSoupRequestInputStreamIsWaitingForData(stream)) {
         g_task_return_int(task.get(), 0);
@@ -143,7 +143,7 @@ void webkitSoupRequestInputStreamAddData(WebKitSoupRequestInputStream* stream, c
     if (webkitSoupRequestInputStreamFinished(stream))
         return;
 
-    DeprecatedMutexLocker locker(stream->priv->readLock);
+    MutexLocker locker(stream->priv->readLock);
 
     if (dataLength) {
         // Truncate the dataLength to the contentLength if it's known.
index 2e9a1ab..dfd6257 100644 (file)
@@ -1,3 +1,17 @@
+2015-08-05  Filip Pizlo  <fpizlo@apple.com>
+
+        Unreviewed, roll out http://trac.webkit.org/changeset/187972.
+
+        * DumpRenderTree/JavaScriptThreading.cpp:
+        (javaScriptThreadsMutex):
+        (runJavaScriptThread):
+        (startJavaScriptThreads):
+        (stopJavaScriptThreads):
+        * TestWebKitAPI/Tests/WTF/WorkQueue.cpp:
+        (TestWebKitAPI::TEST):
+        * TestWebKitAPI/Tests/WTF/glib/WorkQueueGLib.cpp:
+        (TestWebKitAPI::TEST):
+
 2015-08-05  Alex Christensen  <achristensen@webkit.org>
 
         Build DumpRenderTree with CMake.
index 8469489..70d94db 100644 (file)
@@ -44,9 +44,9 @@ static const size_t javaScriptThreadsCount = 4;
 static bool javaScriptThreadsShouldTerminate;
 static JSContextGroupRef javaScriptThreadsGroup;
 
-static DeprecatedMutex& javaScriptThreadsMutex()
+static Mutex& javaScriptThreadsMutex()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, staticMutex, ());
+    DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, staticMutex, ());
     return staticMutex;
 }
 
@@ -70,26 +70,26 @@ void runJavaScriptThread(void*)
 
     JSGlobalContextRef ctx;
     {
-        DeprecatedMutexLocker locker(javaScriptThreadsMutex());
+        MutexLocker locker(javaScriptThreadsMutex());
         ctx = JSGlobalContextCreateInGroup(javaScriptThreadsGroup, 0);
     }
 
     JSStringRef scriptRef;
     {
-        DeprecatedMutexLocker locker(javaScriptThreadsMutex());
+        MutexLocker locker(javaScriptThreadsMutex());
         scriptRef = JSStringCreateWithUTF8CString(script);
     }
 
     while (true) {
         {
-            DeprecatedMutexLocker locker(javaScriptThreadsMutex());
+            MutexLocker locker(javaScriptThreadsMutex());
             JSValueRef exception = 0;
             JSEvaluateScript(ctx, scriptRef, 0, 0, 1, &exception);
             ASSERT(!exception);
         }
 
         {
-            DeprecatedMutexLocker locker(javaScriptThreadsMutex());
+            MutexLocker locker(javaScriptThreadsMutex());
             const size_t valuesCount = 1024;
             JSValueRef values[valuesCount];
             for (size_t i = 0; i < valuesCount; ++i)
@@ -97,7 +97,7 @@ void runJavaScriptThread(void*)
         }
 
         {
-            DeprecatedMutexLocker locker(javaScriptThreadsMutex());
+            MutexLocker locker(javaScriptThreadsMutex());
             if (javaScriptThreadsShouldTerminate)
                 break;
         }
@@ -106,7 +106,7 @@ void runJavaScriptThread(void*)
         if (rand() % 5)
             continue;
 
-        DeprecatedMutexLocker locker(javaScriptThreadsMutex());
+        MutexLocker locker(javaScriptThreadsMutex());
         ThreadIdentifier thread = currentThread();
         detachThread(thread);
         javaScriptThreads().remove(thread);
@@ -114,7 +114,7 @@ void runJavaScriptThread(void*)
         break;
     }
 
-    DeprecatedMutexLocker locker(javaScriptThreadsMutex());
+    MutexLocker locker(javaScriptThreadsMutex());
     JSStringRelease(scriptRef);
     JSGarbageCollect(ctx);
     JSGlobalContextRelease(ctx);
@@ -124,7 +124,7 @@ void startJavaScriptThreads()
 {
     javaScriptThreadsGroup = JSContextGroupCreate();
 
-    DeprecatedMutexLocker locker(javaScriptThreadsMutex());
+    MutexLocker locker(javaScriptThreadsMutex());
 
     for (size_t i = 0; i < javaScriptThreadsCount; ++i)
         javaScriptThreads().add(createThread(&runJavaScriptThread, 0, 0));
@@ -133,13 +133,13 @@ void startJavaScriptThreads()
 void stopJavaScriptThreads()
 {
     {
-        DeprecatedMutexLocker locker(javaScriptThreadsMutex());
+        MutexLocker locker(javaScriptThreadsMutex());
         javaScriptThreadsShouldTerminate = true;
     }
 
     Vector<ThreadIdentifier, javaScriptThreadsCount> threads;
     {
-        DeprecatedMutexLocker locker(javaScriptThreadsMutex());
+        MutexLocker locker(javaScriptThreadsMutex());
         copyToVector(javaScriptThreads(), threads);
         ASSERT(threads.size() == javaScriptThreadsCount);
     }
@@ -148,7 +148,7 @@ void stopJavaScriptThreads()
         waitForThreadCompletion(threads[i]);
 
     {
-        DeprecatedMutexLocker locker(javaScriptThreadsMutex());
+        MutexLocker locker(javaScriptThreadsMutex());
         javaScriptThreads().clear();
     }
 
index ffd8d64..4b03587 100644 (file)
@@ -40,7 +40,7 @@ static const char* dispatchAfterLabel = "dispatchAfter";
     
 TEST(WTF_WorkQueue, Simple)
 {
-    DeprecatedMutex m_lock;
+    Mutex m_lock;
     ThreadCondition m_testCompleted;
     Vector<std::string> m_functionCallOrder;
 
@@ -56,7 +56,7 @@ TEST(WTF_WorkQueue, Simple)
     int initialRefCount = queue->refCount();
     EXPECT_EQ(1, initialRefCount);
 
-    DeprecatedMutexLocker locker(m_lock);
+    MutexLocker locker(m_lock);
     queue->dispatch([&](void) {
         m_functionCallOrder.append(simpleTestLabel);
         calledSimpleTest = true;
@@ -69,7 +69,7 @@ TEST(WTF_WorkQueue, Simple)
     });
 
     queue->dispatch([&](void) {
-        DeprecatedMutexLocker locker(m_lock);
+        MutexLocker locker(m_lock);
         m_functionCallOrder.append(thirdTestLabel);
         calledThirdTest = true;
 
@@ -96,7 +96,7 @@ TEST(WTF_WorkQueue, Simple)
 
 TEST(WTF_WorkQueue, TwoQueues)
 {
-    DeprecatedMutex m_lock;
+    Mutex m_lock;
     ThreadCondition m_testQueue1Completed, m_testQueue2Completed;
     Vector<std::string> m_functionCallOrder;
 
@@ -110,7 +110,7 @@ TEST(WTF_WorkQueue, TwoQueues)
     EXPECT_EQ(1, queue1->refCount());
     EXPECT_EQ(1, queue2->refCount());
 
-    DeprecatedMutexLocker locker(m_lock);
+    MutexLocker locker(m_lock);
     
     queue1->dispatch([&](void) {
         m_functionCallOrder.append(simpleTestLabel);
@@ -120,7 +120,7 @@ TEST(WTF_WorkQueue, TwoQueues)
     queue2->dispatch([&](void) {
         std::this_thread::sleep_for(std::chrono::milliseconds(50));
 
-        DeprecatedMutexLocker locker(m_lock);
+        MutexLocker locker(m_lock);
 
         // Will fail if queue2 took the mutex before queue1.
         EXPECT_TRUE(calledThirdTest);
@@ -131,7 +131,7 @@ TEST(WTF_WorkQueue, TwoQueues)
     });
 
     queue1->dispatch([&](void) {
-        DeprecatedMutexLocker locker(m_lock);
+        MutexLocker locker(m_lock);
         m_functionCallOrder.append(thirdTestLabel);
         calledThirdTest = true;
         
@@ -158,7 +158,7 @@ TEST(WTF_WorkQueue, TwoQueues)
 
 TEST(WTF_WorkQueue, DispatchAfter)
 {
-    DeprecatedMutex m_lock;
+    Mutex m_lock;
     ThreadCondition m_testCompleted, m_dispatchAfterTestCompleted;
     Vector<std::string> m_functionCallOrder;
 
@@ -167,17 +167,17 @@ TEST(WTF_WorkQueue, DispatchAfter)
 
     auto queue = WorkQueue::create("com.apple.WebKit.Test.dispatchAfter");
 
-    DeprecatedMutexLocker locker(m_lock);
+    MutexLocker locker(m_lock);
 
     queue->dispatch([&](void) {
-        DeprecatedMutexLocker locker(m_lock);
+        MutexLocker locker(m_lock);
         m_functionCallOrder.append(simpleTestLabel);
         calledSimpleTest = true;
         m_testCompleted.signal();
     });
 
     queue->dispatchAfter(std::chrono::milliseconds(500), [&](void) {
-        DeprecatedMutexLocker locker(m_lock);
+        MutexLocker locker(m_lock);
         m_functionCallOrder.append(dispatchAfterLabel);
         calledDispatchAfterTest = true;
         m_dispatchAfterTestCompleted.signal();
index a5c41eb..28c9112 100644 (file)
@@ -37,7 +37,7 @@ namespace TestWebKitAPI {
 TEST(WTF_WorkQueue, AsyncIO)
 {
     struct TestingContext {
-        DeprecatedMutex m_lock;
+        Mutex m_lock;
         ThreadCondition m_testCompleted;
         GMainContext* m_mainContext;
     } context;
@@ -49,7 +49,7 @@ TEST(WTF_WorkQueue, AsyncIO)
     GUniquePtr<char> currentDirectory(g_get_current_dir());
     GRefPtr<GFile> file = adoptGRef(g_file_new_for_path(currentDirectory.get()));
 
-    DeprecatedMutexLocker locker(context.m_lock);
+    MutexLocker locker(context.m_lock);
     queue->dispatch([&](void) {
         EXPECT_TRUE(g_main_context_get_thread_default());
         EXPECT_TRUE(g_main_context_get_thread_default() != context.m_mainContext);
@@ -57,7 +57,7 @@ TEST(WTF_WorkQueue, AsyncIO)
         g_file_query_info_async(file.get(), G_FILE_ATTRIBUTE_STANDARD_SIZE, G_FILE_QUERY_INFO_NONE, G_PRIORITY_DEFAULT, nullptr,
             [](GObject*, GAsyncResult*, gpointer userData) {
                 TestingContext* context = static_cast<TestingContext*>(userData);
-                DeprecatedMutexLocker locker(context->m_lock);
+                MutexLocker locker(context->m_lock);
                 EXPECT_EQ(g_main_context_get_thread_default(), context->m_mainContext);
                 context->m_testCompleted.signal();
             }, &context);