Skip to content

Commit b46f54e

Browse files
committed
Replace LockHolder with Locker in local variables
https://bugs.webkit.org/show_bug.cgi?id=226133 Reviewed by Darin Adler. Replace LockHolder with Locker in local variables. It is shorter and it allows switching the lock type more easily since the compiler with deduce the lock type T for Locker<T>. Source/JavaScriptCore: * API/JSCallbackObject.h: (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty): (JSC::JSCallbackObjectData::JSPrivatePropertyMap::deletePrivateProperty): (JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren): * API/JSValue.mm: (handerForStructTag): * API/tests/testapi.cpp: (testCAPIViaCpp): * assembler/testmasm.cpp: (JSC::run): * b3/air/testair.cpp: * b3/testb3_1.cpp: (run): * bytecode/DirectEvalCodeCache.cpp: (JSC::DirectEvalCodeCache::setSlow): (JSC::DirectEvalCodeCache::clear): (JSC::DirectEvalCodeCache::visitAggregateImpl): * bytecode/SuperSampler.cpp: (JSC::initializeSuperSampler): (JSC::resetSuperSamplerState): (JSC::printSuperSamplerState): (JSC::enableSuperSampler): (JSC::disableSuperSampler): * dfg/DFGCommonData.cpp: (JSC::DFG::CommonData::invalidate): (JSC::DFG::CommonData::~CommonData): (JSC::DFG::CommonData::installVMTrapBreakpoints): (JSC::DFG::codeBlockForVMTrapPC): * dfg/DFGPlan.cpp: (JSC::DFG::Plan::cleanMustHandleValuesIfNecessary): * dfg/DFGWorklist.cpp: (JSC::DFG::Worklist::~Worklist): (JSC::DFG::Worklist::finishCreation): (JSC::DFG::Worklist::isActiveForVM const): (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::removeNonCompilingPlansForVM): (JSC::DFG::Worklist::queueLength): (JSC::DFG::Worklist::dump const): (JSC::DFG::Worklist::setNumberOfThreads): * dfg/DFGWorklistInlines.h: (JSC::DFG::Worklist::iterateCodeBlocksForGC): * disassembler/Disassembler.cpp: * heap/BlockDirectory.cpp: (JSC::BlockDirectory::addBlock): * heap/CodeBlockSetInlines.h: (JSC::CodeBlockSet::iterateCurrentlyExecuting): * heap/ConservativeRoots.cpp: (JSC::ConservativeRoots::add): * heap/Heap.cpp: (JSC::Heap::Heap): (JSC::Heap::lastChanceToFinalize): (JSC::Heap::collectAsync): (JSC::Heap::runBeginPhase): (JSC::Heap::waitForCollector): (JSC::Heap::requestCollection): (JSC::Heap::notifyIsSafeToCollect): * heap/SlotVisitor.cpp: (JSC::SlotVisitor::didReachTermination): * inspector/agents/InspectorScriptProfilerAgent.cpp: (Inspector::InspectorScriptProfilerAgent::startTracking): (Inspector::InspectorScriptProfilerAgent::trackingComplete): (Inspector::InspectorScriptProfilerAgent::stopSamplingWhenDisconnecting): * inspector/remote/RemoteConnectionToTarget.cpp: (Inspector::RemoteConnectionToTarget::setup): (Inspector::RemoteConnectionToTarget::sendMessageToTarget): (Inspector::RemoteConnectionToTarget::close): (Inspector::RemoteConnectionToTarget::targetClosed): * inspector/remote/RemoteInspector.cpp: (Inspector::RemoteInspector::registerTarget): (Inspector::RemoteInspector::unregisterTarget): (Inspector::RemoteInspector::updateTarget): (Inspector::RemoteInspector::updateClientCapabilities): (Inspector::RemoteInspector::setClient): (Inspector::RemoteInspector::setupFailed): (Inspector::RemoteInspector::setupCompleted): (Inspector::RemoteInspector::stop): * inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm: (Inspector::RemoteTargetHandleRunSourceGlobal): (Inspector::RemoteTargetQueueTaskOnGlobalQueue): (Inspector::RemoteTargetHandleRunSourceWithInfo): (Inspector::RemoteConnectionToTarget::setup): (Inspector::RemoteConnectionToTarget::targetClosed): (Inspector::RemoteConnectionToTarget::close): (Inspector::RemoteConnectionToTarget::sendMessageToTarget): (Inspector::RemoteConnectionToTarget::queueTaskOnPrivateRunLoop): * inspector/remote/cocoa/RemoteInspectorCocoa.mm: (Inspector::RemoteInspector::updateAutomaticInspectionCandidate): (Inspector::RemoteInspector::sendMessageToRemote): (Inspector::RemoteInspector::start): (Inspector::RemoteInspector::setupXPCConnectionIfNeeded): (Inspector::RemoteInspector::setParentProcessInformation): (Inspector::RemoteInspector::xpcConnectionReceivedMessage): (Inspector::RemoteInspector::xpcConnectionFailed): (Inspector::RemoteInspector::pushListingsSoon): (Inspector::RemoteInspector::receivedIndicateMessage): (Inspector::RemoteInspector::receivedProxyApplicationSetupMessage): * inspector/remote/cocoa/RemoteInspectorXPCConnection.mm: (Inspector::RemoteInspectorXPCConnection::close): (Inspector::RemoteInspectorXPCConnection::closeFromMessage): (Inspector::RemoteInspectorXPCConnection::deserializeMessage): (Inspector::RemoteInspectorXPCConnection::handleEvent): * inspector/remote/glib/RemoteInspectorGlib.cpp: (Inspector::RemoteInspector::start): (Inspector::RemoteInspector::setupConnection): (Inspector::RemoteInspector::pushListingsSoon): (Inspector::RemoteInspector::sendMessageToRemote): (Inspector::RemoteInspector::receivedGetTargetListMessage): (Inspector::RemoteInspector::receivedDataMessage): (Inspector::RemoteInspector::receivedCloseMessage): (Inspector::RemoteInspector::setup): * inspector/remote/socket/RemoteInspectorConnectionClient.cpp: (Inspector::RemoteInspectorConnectionClient::didReceive): * inspector/remote/socket/RemoteInspectorSocket.cpp: (Inspector::RemoteInspector::didClose): (Inspector::RemoteInspector::start): (Inspector::RemoteInspector::pushListingsSoon): (Inspector::RemoteInspector::setup): (Inspector::RemoteInspector::setupInspectorClient): (Inspector::RemoteInspector::frontendDidClose): (Inspector::RemoteInspector::sendMessageToBackend): (Inspector::RemoteInspector::startAutomationSession): * inspector/remote/socket/RemoteInspectorSocketEndpoint.cpp: (Inspector::RemoteInspectorSocketEndpoint::listenInet): (Inspector::RemoteInspectorSocketEndpoint::isListening): (Inspector::RemoteInspectorSocketEndpoint::workerThread): (Inspector::RemoteInspectorSocketEndpoint::createClient): (Inspector::RemoteInspectorSocketEndpoint::disconnect): (Inspector::RemoteInspectorSocketEndpoint::invalidateClient): (Inspector::RemoteInspectorSocketEndpoint::invalidateListener): (Inspector::RemoteInspectorSocketEndpoint::getPort const): (Inspector::RemoteInspectorSocketEndpoint::recvIfEnabled): (Inspector::RemoteInspectorSocketEndpoint::sendIfEnabled): (Inspector::RemoteInspectorSocketEndpoint::send): (Inspector::RemoteInspectorSocketEndpoint::acceptInetSocketIfEnabled): * interpreter/CLoopStack.cpp: (JSC::CLoopStack::addToCommittedByteCount): (JSC::CLoopStack::committedByteCount): * jit/ExecutableAllocator.cpp: (JSC::dumpJITMemory): * jit/ICStats.cpp: (JSC::ICStats::ICStats): (JSC::ICStats::~ICStats): * jit/JITThunks.cpp: (JSC::JITThunks::ctiStub): (JSC::JITThunks::existingCTIStub): (JSC::JITThunks::ctiSlowPathFunctionStub): * jit/JITWorklist.cpp: (JSC::JITWorklist::Plan::compileInThread): (JSC::JITWorklist::Plan::isFinishedCompiling): (JSC::JITWorklist::JITWorklist): (JSC::JITWorklist::completeAllForVM): (JSC::JITWorklist::poll): (JSC::JITWorklist::compileLater): (JSC::JITWorklist::finalizePlans): * parser/SourceProvider.cpp: (JSC::SourceProvider::getID): * profiler/ProfilerDatabase.cpp: (JSC::Profiler::Database::ensureBytecodesFor): (JSC::Profiler::Database::notifyDestruction): (JSC::Profiler::Database::addCompilation): (JSC::Profiler::Database::logEvent): (JSC::Profiler::Database::addDatabaseToAtExit): (JSC::Profiler::Database::removeDatabaseFromAtExit): (JSC::Profiler::Database::removeFirstAtExitDatabase): * profiler/ProfilerUID.cpp: (JSC::Profiler::UID::create): * runtime/DeferredWorkTimer.cpp: (JSC::DeferredWorkTimer::scheduleWorkSoon): (JSC::DeferredWorkTimer::didResumeScriptExecutionOwner): * runtime/SamplingProfiler.cpp: (JSC::SamplingProfiler::timerLoop): (JSC::SamplingProfiler::shutdown): (JSC::SamplingProfiler::start): (JSC::SamplingProfiler::noticeCurrentThreadAsJSCExecutionThread): (JSC::SamplingProfiler::noticeJSLockAcquisition): (JSC::SamplingProfiler::noticeVMEntry): (JSC::SamplingProfiler::registerForReportAtExit): * runtime/Watchdog.cpp: (JSC::Watchdog::startTimer): (JSC::Watchdog::willDestroyVM): * tools/VMInspector.cpp: (JSC::VMInspector::isValidExecutableMemory): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::work): * wasm/WasmEntryPlan.cpp: (JSC::Wasm::EntryPlan::ThreadCountHolder::ThreadCountHolder): (JSC::Wasm::EntryPlan::ThreadCountHolder::~ThreadCountHolder): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::work): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::addCompletionTask): (JSC::Wasm::Plan::waitForCompletion): (JSC::Wasm::Plan::tryRemoveContextAndCancelIfLast): * wasm/WasmSignature.cpp: (JSC::Wasm::SignatureInformation::signatureFor): (JSC::Wasm::SignatureInformation::tryCleanup): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::enqueue): (JSC::Wasm::Worklist::completePlanSynchronously): (JSC::Wasm::Worklist::stopAllPlansForContext): (JSC::Wasm::Worklist::Worklist): (JSC::Wasm::Worklist::~Worklist): Source/WebCore: * Modules/webaudio/AsyncAudioDecoder.cpp: (WebCore::AsyncAudioDecoder::AsyncAudioDecoder): (WebCore::AsyncAudioDecoder::runLoop): * Modules/webdatabase/Database.cpp: (WebCore::Database::performClose): (WebCore::Database::inProgressTransactionCompleted): (WebCore::Database::hasPendingTransaction): (WebCore::Database::runTransaction): * Modules/webdatabase/DatabaseThread.cpp: (WebCore::DatabaseThread::start): (WebCore::DatabaseThread::databaseThread): (WebCore::DatabaseThread::recordDatabaseOpen): (WebCore::DatabaseThread::recordDatabaseClosed): (WebCore::DatabaseThread::hasPendingDatabaseActivity const): * Modules/webdatabase/DatabaseTracker.cpp: (WebCore::DatabaseTracker::canEstablishDatabase): (WebCore::DatabaseTracker::retryCanEstablishDatabase): (WebCore::DatabaseTracker::maximumSize): (WebCore::DatabaseTracker::fullPathForDatabase): (WebCore::DatabaseTracker::origins): (WebCore::DatabaseTracker::databaseNames): (WebCore::DatabaseTracker::detailsForNameAndOrigin): (WebCore::DatabaseTracker::setDatabaseDetails): (WebCore::DatabaseTracker::doneCreatingDatabase): (WebCore::DatabaseTracker::openDatabases): (WebCore::DatabaseTracker::addOpenDatabase): (WebCore::DatabaseTracker::removeOpenDatabase): (WebCore::DatabaseTracker::originLockFor): (WebCore::DatabaseTracker::quota): (WebCore::DatabaseTracker::setQuota): (WebCore::DatabaseTracker::deleteOrigin): (WebCore::DatabaseTracker::deleteDatabase): (WebCore::DatabaseTracker::deleteDatabaseFile): (WebCore::DatabaseTracker::removeDeletedOpenedDatabases): * Modules/webdatabase/SQLCallbackWrapper.h: (WebCore::SQLCallbackWrapper::clear): (WebCore::SQLCallbackWrapper::unwrap): * Modules/webdatabase/SQLTransaction.cpp: (WebCore::SQLTransaction::enqueueStatement): (WebCore::SQLTransaction::checkAndHandleClosedDatabase): (WebCore::SQLTransaction::getNextStatement): * Modules/webdatabase/SQLTransactionBackend.cpp: (WebCore::SQLTransactionBackend::doCleanup): * accessibility/isolatedtree/AXIsolatedTree.cpp: (WebCore::AXIsolatedTree::clear): (WebCore::AXIsolatedTree::generateSubtree): (WebCore::AXIsolatedTree::createSubtree): (WebCore::AXIsolatedTree::updateNode): (WebCore::AXIsolatedTree::updateNodeProperty): (WebCore::AXIsolatedTree::updateChildren): (WebCore::AXIsolatedTree::focusedNode): (WebCore::AXIsolatedTree::rootNode): (WebCore::AXIsolatedTree::setFocusedNodeID): (WebCore::AXIsolatedTree::removeNode): (WebCore::AXIsolatedTree::removeSubtree): (WebCore::AXIsolatedTree::applyPendingChanges): * page/scrolling/mac/ScrollingTreeMac.mm: (ScrollingTreeMac::scrollingNodeForPoint): (ScrollingTreeMac::eventListenerRegionTypesForPoint const): * platform/AbortableTaskQueue.h: * platform/audio/cocoa/CARingBuffer.cpp: (WebCore::CARingBufferStorageVector::flush): (WebCore::CARingBufferStorageVector::setCurrentFrameBounds): * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::AVFWrapper::addToMap): (WebCore::AVFWrapper::removeFromMap const): (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/avfoundation/objc/ImageDecoderAVFObjC.mm: (-[WebCoreSharedBufferResourceLoaderDelegate setExpectedContentSize:]): (-[WebCoreSharedBufferResourceLoaderDelegate updateData:complete:]): (-[WebCoreSharedBufferResourceLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]): (-[WebCoreSharedBufferResourceLoaderDelegate resourceLoader:didCancelLoadingRequest:]): (WebCore::ImageDecoderAVFObjC::setTrack): (WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex): * platform/graphics/gstreamer/ImageDecoderGStreamer.cpp: (WebCore::ImageDecoderGStreamer::createFrameImageAtIndex): * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: (WebCore::InbandTextTrackPrivateGStreamer::handleSample): (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample): * platform/graphics/gstreamer/MainThreadNotifier.h: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::parseInitDataFromProtectionMessage): (WebCore::MediaPlayerPrivateGStreamer::handleProtectionEvent): * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp: (WebCore::TrackPrivateBaseGStreamer::tagsChanged): (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: (VideoRenderRequestScheduler::start): (VideoRenderRequestScheduler::stop): (VideoRenderRequestScheduler::drain): (VideoRenderRequestScheduler::requestRender): * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp: (transformInPlace): (sinkEventHandler): (webKitMediaCommonEncryptionDecryptIsFlushing): (setContext): * platform/graphics/nicosia/NicosiaBuffer.cpp: (Nicosia::Buffer::beginPainting): (Nicosia::Buffer::completePainting): (Nicosia::Buffer::waitUntilPaintingComplete): * platform/graphics/nicosia/NicosiaPlatformLayer.h: (Nicosia::PlatformLayer::setSceneIntegration): (Nicosia::PlatformLayer::createUpdateScope): (Nicosia::CompositionLayer::updateState): (Nicosia::CompositionLayer::flushState): (Nicosia::CompositionLayer::commitState): (Nicosia::CompositionLayer::accessPending): (Nicosia::CompositionLayer::accessCommitted): * platform/graphics/nicosia/NicosiaScene.h: (Nicosia::Scene::accessState): * platform/graphics/nicosia/NicosiaSceneIntegration.cpp: (Nicosia::SceneIntegration::setClient): (Nicosia::SceneIntegration::invalidate): (Nicosia::SceneIntegration::requestUpdate): * platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.cpp: (Nicosia::BackingStoreTextureMapperImpl::flushUpdate): (Nicosia::BackingStoreTextureMapperImpl::takeUpdate): * platform/graphics/nicosia/texmap/NicosiaContentLayerTextureMapperImpl.cpp: (Nicosia::ContentLayerTextureMapperImpl::~ContentLayerTextureMapperImpl): (Nicosia::ContentLayerTextureMapperImpl::invalidateClient): (Nicosia::ContentLayerTextureMapperImpl::flushUpdate): (Nicosia::ContentLayerTextureMapperImpl::swapBuffersIfNeeded): * platform/graphics/nicosia/texmap/NicosiaImageBackingTextureMapperImpl.cpp: (Nicosia::ImageBackingTextureMapperImpl::flushUpdate): (Nicosia::ImageBackingTextureMapperImpl::takeUpdate): * platform/graphics/texmap/TextureMapperGCGLPlatformLayer.cpp: (WebCore::TextureMapperGCGLPlatformLayer::swapBuffersIfNeeded): * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: (WebCore::MediaPlayerPrivateMediaFoundation::load): (WebCore::MediaPlayerPrivateMediaFoundation::naturalSize const): (WebCore::MediaPlayerPrivateMediaFoundation::addListener): (WebCore::MediaPlayerPrivateMediaFoundation::removeListener): (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted): (WebCore::MediaPlayerPrivateMediaFoundation::setNaturalSize): (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke): (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted): (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::OnClockStart): (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::OnClockStop): (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::OnClockPause): (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::OnClockRestart): (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::OnClockSetRate): (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::ProcessMessage): (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetCurrentMediaType): (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::InitServicePointers): (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::ReleaseServicePointers): (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetVideoWindow): (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetVideoWindow): (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetVideoPosition): (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetVideoPosition): (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::RepaintVideo): (WebCore::MediaPlayerPrivateMediaFoundation::VideoSamplePool::getSample): (WebCore::MediaPlayerPrivateMediaFoundation::VideoSamplePool::returnSample): (WebCore::MediaPlayerPrivateMediaFoundation::VideoSamplePool::areSamplesPending): (WebCore::MediaPlayerPrivateMediaFoundation::VideoSamplePool::initialize): (WebCore::MediaPlayerPrivateMediaFoundation::VideoSamplePool::clear): (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::stopScheduler): (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::scheduleSample): (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::processSamplesInQueue): (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::processSample): (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::schedulerThreadProcPrivate): (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::setVideoWindow): (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::setDestinationRect): (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::createVideoSamples): (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::checkDeviceState): (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::presentSample): (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame): (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::createD3DDevice): * platform/image-decoders/ScalableImageDecoder.cpp: (WebCore::ScalableImageDecoder::frameIsCompleteAtIndex const): (WebCore::ScalableImageDecoder::frameHasAlphaAtIndex const): (WebCore::ScalableImageDecoder::frameBytesAtIndex const): (WebCore::ScalableImageDecoder::frameDurationAtIndex const): (WebCore::ScalableImageDecoder::createFrameImageAtIndex): * platform/image-decoders/ScalableImageDecoder.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 const): (WebCore::LegacyTileCache::tileCreationTimerFired): (WebCore::LegacyTileCache::setNeedsDisplayInRect): (WebCore::LegacyTileCache::updateTilingMode): (WebCore::LegacyTileCache::setTilingMode): (WebCore::LegacyTileCache::doPendingRepaints): (WebCore::LegacyTileCache::flushSavedDisplayRects): (WebCore::LegacyTileCache::prepareToDraw): * platform/ios/LegacyTileLayerPool.mm: (WebCore::LegacyTileLayerPool::addLayer): (WebCore::LegacyTileLayerPool::takeLayerWithSize): (WebCore::LegacyTileLayerPool::setCapacity): (WebCore::LegacyTileLayerPool::prune): (WebCore::LegacyTileLayerPool::drain): * platform/ios/wak/WAKWindow.mm: (-[WAKWindow setExposedScrollViewRect:]): (-[WAKWindow exposedScrollViewRect]): * platform/ios/wak/WebCoreThread.mm: (RunWebThread): (StartWebThread): * platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp: (WebCore::RealtimeOutgoingAudioSourceLibWebRTC::audioSamplesAvailable): (WebCore::RealtimeOutgoingAudioSourceLibWebRTC::pullAudioData): * platform/network/cf/FormDataStreamCFNet.cpp: (WebCore::openNextStream): (WebCore::formFinalize): (WebCore::formClose): * platform/network/curl/CurlRequest.cpp: (WebCore::CurlRequest::setRequestPaused): (WebCore::CurlRequest::setCallbackPaused): (WebCore::CurlRequest::pausedStatusChanged): (WebCore::CurlRequest::enableDownloadToFile): (WebCore::CurlRequest::getDownloadedFilePath): (WebCore::CurlRequest::writeDataToDownloadFileIfEnabled): (WebCore::CurlRequest::closeDownloadFile): (WebCore::CurlRequest::cleanupDownloadFile): * platform/network/curl/CurlSSLHandle.cpp: (WebCore::CurlSSLHandle::allowAnyHTTPSCertificatesForHost): (WebCore::CurlSSLHandle::canIgnoreAnyHTTPSCertificatesForHost const): (WebCore::CurlSSLHandle::setClientCertificateInfo): (WebCore::CurlSSLHandle::getSSLClientCertificate const): * 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::interrupt): (WebCore::SQLiteDatabase::setAuthorizer): (WebCore::constructAndPrepareStatement): * platform/sql/SQLiteStatement.cpp: (WebCore::SQLiteStatement::step): Source/WebKit: * NetworkProcess/IndexedDB/WebIDBServer.cpp: (WebKit::m_closeCallback): (WebKit::WebIDBServer::getOrigins): (WebKit::WebIDBServer::closeAndDeleteDatabasesModifiedSince): (WebKit::WebIDBServer::closeAndDeleteDatabasesForOrigins): (WebKit::WebIDBServer::renameOrigin): (WebKit::WebIDBServer::openDatabase): (WebKit::WebIDBServer::deleteDatabase): (WebKit::WebIDBServer::abortTransaction): (WebKit::WebIDBServer::commitTransaction): (WebKit::WebIDBServer::didFinishHandlingVersionChangeTransaction): (WebKit::WebIDBServer::createObjectStore): (WebKit::WebIDBServer::deleteObjectStore): (WebKit::WebIDBServer::renameObjectStore): (WebKit::WebIDBServer::clearObjectStore): (WebKit::WebIDBServer::createIndex): (WebKit::WebIDBServer::deleteIndex): (WebKit::WebIDBServer::renameIndex): (WebKit::WebIDBServer::putOrAdd): (WebKit::WebIDBServer::getRecord): (WebKit::WebIDBServer::getAllRecords): (WebKit::WebIDBServer::getCount): (WebKit::WebIDBServer::deleteRecord): (WebKit::WebIDBServer::openCursor): (WebKit::WebIDBServer::iterateCursor): (WebKit::WebIDBServer::establishTransaction): (WebKit::WebIDBServer::databaseConnectionPendingClose): (WebKit::WebIDBServer::databaseConnectionClosed): (WebKit::WebIDBServer::abortOpenAndUpgradeNeeded): (WebKit::WebIDBServer::didFireVersionChangeEvent): (WebKit::WebIDBServer::openDBRequestCancelled): (WebKit::WebIDBServer::getAllDatabaseNamesAndVersions): (WebKit::WebIDBServer::addConnection): (WebKit::WebIDBServer::removeConnection): (WebKit::WebIDBServer::close): * NetworkProcess/cache/CacheStorageEngine.cpp: (WebKit::CacheStorage::Engine::writeSizeFile): (WebKit::CacheStorage::Engine::readSizeFile): (WebKit::CacheStorage::Engine::clearAllCachesFromDisk): (WebKit::CacheStorage::Engine::deleteNonEmptyDirectoryOnBackgroundThread): * NetworkProcess/glib/DNSCache.cpp: (WebKit::DNSCache::lookup): (WebKit::DNSCache::update): (WebKit::DNSCache::removeExpiredResponsesFired): (WebKit::DNSCache::clear): * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp: (WebKit::CompositingRunLoop::suspend): (WebKit::CompositingRunLoop::resume): (WebKit::CompositingRunLoop::scheduleUpdate): (WebKit::CompositingRunLoop::stopUpdates): (WebKit::CompositingRunLoop::updateTimerFired): * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: (WebKit::m_displayRefreshMonitor): (WebKit::ThreadedCompositor::setScaleFactor): (WebKit::ThreadedCompositor::setScrollPosition): (WebKit::ThreadedCompositor::setViewportSize): (WebKit::ThreadedCompositor::renderLayerTree): (WebKit::ThreadedCompositor::sceneUpdateFinished): (WebKit::ThreadedCompositor::updateSceneState): * UIProcess/API/glib/IconDatabase.cpp: (WebKit::IconDatabase::populatePageURLToIconURLMap): (WebKit::IconDatabase::clearLoadedIconsTimerFired): (WebKit::IconDatabase::checkIconURLAndSetPageURLIfNeeded): (WebKit::IconDatabase::loadIconForPageURL): (WebKit::IconDatabase::iconURLForPageURL): (WebKit::IconDatabase::setIconForPageURL): (WebKit::IconDatabase::clear): Source/WebKitLegacy: * Storage/InProcessIDBServer.cpp: (InProcessIDBServer::InProcessIDBServer): (InProcessIDBServer::deleteDatabase): (InProcessIDBServer::openDatabase): (InProcessIDBServer::abortTransaction): (InProcessIDBServer::commitTransaction): (InProcessIDBServer::didFinishHandlingVersionChangeTransaction): (InProcessIDBServer::createObjectStore): (InProcessIDBServer::deleteObjectStore): (InProcessIDBServer::renameObjectStore): (InProcessIDBServer::clearObjectStore): (InProcessIDBServer::createIndex): (InProcessIDBServer::deleteIndex): (InProcessIDBServer::renameIndex): (InProcessIDBServer::putOrAdd): (InProcessIDBServer::getRecord): (InProcessIDBServer::getAllRecords): (InProcessIDBServer::getCount): (InProcessIDBServer::deleteRecord): (InProcessIDBServer::openCursor): (InProcessIDBServer::iterateCursor): (InProcessIDBServer::establishTransaction): (InProcessIDBServer::databaseConnectionPendingClose): (InProcessIDBServer::databaseConnectionClosed): (InProcessIDBServer::abortOpenAndUpgradeNeeded): (InProcessIDBServer::didFireVersionChangeEvent): (InProcessIDBServer::openDBRequestCancelled): (InProcessIDBServer::getAllDatabaseNamesAndVersions): (InProcessIDBServer::closeAndDeleteDatabasesModifiedSince): * Storage/StorageAreaSync.cpp: (WebKit::StorageAreaSync::syncTimerFired): (WebKit::StorageAreaSync::performSync): * Storage/StorageTracker.cpp: (WebKit::StorageTracker::finishedImportingOriginIdentifiers): (WebKit::StorageTracker::syncImportOriginIdentifiers): (WebKit::StorageTracker::syncFileSystemAndTrackerDatabase): (WebKit::StorageTracker::setOriginDetails): (WebKit::StorageTracker::syncSetOriginDetails): (WebKit::StorageTracker::origins): (WebKit::StorageTracker::deleteAllOrigins): (WebKit::StorageTracker::syncDeleteAllOrigins): (WebKit::StorageTracker::deleteOrigin): (WebKit::StorageTracker::syncDeleteOrigin): (WebKit::StorageTracker::canDeleteOrigin): (WebKit::StorageTracker::cancelDeletingOrigin): (WebKit::StorageTracker::diskUsageForOrigin): Source/WebKitLegacy/mac: * WebView/WebView.mm: (-[WebView _synchronizeCustomFixedPositionLayoutRect]): (-[WebView _setCustomFixedPositionLayoutRectInWebThread:synchronize:]): (-[WebView _setCustomFixedPositionLayoutRect:]): (-[WebView _fetchCustomFixedPositionLayoutRect:]): Source/WebKitLegacy/win: * Plugins/PluginMainThreadScheduler.cpp: (WebCore::PluginMainThreadScheduler::scheduleCall): (WebCore::PluginMainThreadScheduler::registerPlugin): (WebCore::PluginMainThreadScheduler::unregisterPlugin): (WebCore::PluginMainThreadScheduler::dispatchCallsForPlugin): Source/WTF: * benchmarks/LockSpeedTest.cpp: * wtf/AutomaticThread.cpp: (WTF::AutomaticThread::~AutomaticThread): (WTF::AutomaticThread::join): (WTF::AutomaticThread::start): * wtf/AutomaticThread.h: * wtf/MetaAllocator.cpp: (WTF::MetaAllocatorHandle::shrink): (WTF::MetaAllocator::addFreshFreeSpace): (WTF::MetaAllocator::debugFreeSpaceSize): * wtf/ParallelHelperPool.cpp: (WTF::ParallelHelperClient::ParallelHelperClient): (WTF::ParallelHelperClient::~ParallelHelperClient): (WTF::ParallelHelperClient::setTask): (WTF::ParallelHelperClient::finish): (WTF::ParallelHelperClient::doSomeHelping): (WTF::ParallelHelperClient::runTask): (WTF::ParallelHelperPool::~ParallelHelperPool): (WTF::ParallelHelperPool::ensureThreads): (WTF::ParallelHelperPool::doSomeHelping): * wtf/Seconds.cpp: (WTF::sleep): * wtf/TimeWithDynamicClockType.cpp: (WTF::sleep): * wtf/WorkerPool.cpp: (WTF::WorkerPool::WorkerPool): (WTF::WorkerPool::~WorkerPool): (WTF::WorkerPool::postTask): * wtf/posix/ThreadingPOSIX.cpp: (WTF::Thread::suspend): (WTF::Thread::resume): (WTF::Thread::getRegisters): * wtf/win/DbgHelperWin.cpp: (WTF::DbgHelper::SymFromAddress): * wtf/win/ThreadingWin.cpp: (WTF::Thread::suspend): (WTF::Thread::resume): (WTF::Thread::getRegisters): Tools: * TestWebKitAPI/Tests/WTF/WorkQueue.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/glib/WorkQueueGLib.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: (TestWebKitAPI::DeterministicScheduler::ThreadContext::waitMyTurn): (TestWebKitAPI::DeterministicScheduler::ThreadContext::yieldToThread): Canonical link: https://commits.webkit.org/238053@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277920 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 5946249 commit b46f54e

120 files changed

Lines changed: 1312 additions & 601 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Source/JavaScriptCore/API/JSCallbackObject.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,21 +95,21 @@ struct JSCallbackObjectData {
9595

9696
void setPrivateProperty(VM& vm, JSCell* owner, const Identifier& propertyName, JSValue value)
9797
{
98-
LockHolder locker(m_lock);
98+
Locker locker { m_lock };
9999
WriteBarrier<Unknown> empty;
100100
m_propertyMap.add(propertyName.impl(), empty).iterator->value.set(vm, owner, value);
101101
}
102102

103103
void deletePrivateProperty(const Identifier& propertyName)
104104
{
105-
LockHolder locker(m_lock);
105+
Locker locker { m_lock };
106106
m_propertyMap.remove(propertyName.impl());
107107
}
108108

109109
template<typename Visitor>
110110
void visitChildren(Visitor& visitor)
111111
{
112-
LockHolder locker(m_lock);
112+
Locker locker { m_lock };
113113
for (auto& pair : m_propertyMap) {
114114
if (pair.value)
115115
visitor.append(pair.value);

Source/JavaScriptCore/API/JSValue.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,7 @@ - (JSValue *)initWithValue:(JSValueRef)value inContext:(JSContext *)context
12091209
static StructTagHandler* handerForStructTag(const char* encodedType)
12101210
{
12111211
static Lock handerForStructTagLock;
1212-
LockHolder lockHolder(&handerForStructTagLock);
1212+
Locker lockHolder { handerForStructTagLock };
12131213

12141214
static StructHandlers* structHandlers = createStructHandlerMap();
12151215

Source/JavaScriptCore/API/tests/testapi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ int testCAPIViaCpp(const char* filter)
765765
for (;;) {
766766
RefPtr<SharedTask<void(TestAPI&)>> task;
767767
{
768-
LockHolder locker(lock);
768+
Locker locker { lock };
769769
if (tasks.isEmpty())
770770
break;
771771
task = tasks.takeFirst();

Source/JavaScriptCore/ChangeLog

Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,222 @@
1+
2021-05-22 Chris Dumez <[email protected]>
2+
3+
Replace LockHolder with Locker in local variables
4+
https://bugs.webkit.org/show_bug.cgi?id=226133
5+
6+
Reviewed by Darin Adler.
7+
8+
Replace LockHolder with Locker in local variables. It is shorter and it allows switching the lock
9+
type more easily since the compiler with deduce the lock type T for Locker<T>.
10+
11+
* API/JSCallbackObject.h:
12+
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
13+
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::deletePrivateProperty):
14+
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren):
15+
* API/JSValue.mm:
16+
(handerForStructTag):
17+
* API/tests/testapi.cpp:
18+
(testCAPIViaCpp):
19+
* assembler/testmasm.cpp:
20+
(JSC::run):
21+
* b3/air/testair.cpp:
22+
* b3/testb3_1.cpp:
23+
(run):
24+
* bytecode/DirectEvalCodeCache.cpp:
25+
(JSC::DirectEvalCodeCache::setSlow):
26+
(JSC::DirectEvalCodeCache::clear):
27+
(JSC::DirectEvalCodeCache::visitAggregateImpl):
28+
* bytecode/SuperSampler.cpp:
29+
(JSC::initializeSuperSampler):
30+
(JSC::resetSuperSamplerState):
31+
(JSC::printSuperSamplerState):
32+
(JSC::enableSuperSampler):
33+
(JSC::disableSuperSampler):
34+
* dfg/DFGCommonData.cpp:
35+
(JSC::DFG::CommonData::invalidate):
36+
(JSC::DFG::CommonData::~CommonData):
37+
(JSC::DFG::CommonData::installVMTrapBreakpoints):
38+
(JSC::DFG::codeBlockForVMTrapPC):
39+
* dfg/DFGPlan.cpp:
40+
(JSC::DFG::Plan::cleanMustHandleValuesIfNecessary):
41+
* dfg/DFGWorklist.cpp:
42+
(JSC::DFG::Worklist::~Worklist):
43+
(JSC::DFG::Worklist::finishCreation):
44+
(JSC::DFG::Worklist::isActiveForVM const):
45+
(JSC::DFG::Worklist::enqueue):
46+
(JSC::DFG::Worklist::compilationState):
47+
(JSC::DFG::Worklist::waitUntilAllPlansForVMAreReady):
48+
(JSC::DFG::Worklist::removeAllReadyPlansForVM):
49+
(JSC::DFG::Worklist::completeAllReadyPlansForVM):
50+
(JSC::DFG::Worklist::visitWeakReferences):
51+
(JSC::DFG::Worklist::removeDeadPlans):
52+
(JSC::DFG::Worklist::removeNonCompilingPlansForVM):
53+
(JSC::DFG::Worklist::queueLength):
54+
(JSC::DFG::Worklist::dump const):
55+
(JSC::DFG::Worklist::setNumberOfThreads):
56+
* dfg/DFGWorklistInlines.h:
57+
(JSC::DFG::Worklist::iterateCodeBlocksForGC):
58+
* disassembler/Disassembler.cpp:
59+
* heap/BlockDirectory.cpp:
60+
(JSC::BlockDirectory::addBlock):
61+
* heap/CodeBlockSetInlines.h:
62+
(JSC::CodeBlockSet::iterateCurrentlyExecuting):
63+
* heap/ConservativeRoots.cpp:
64+
(JSC::ConservativeRoots::add):
65+
* heap/Heap.cpp:
66+
(JSC::Heap::Heap):
67+
(JSC::Heap::lastChanceToFinalize):
68+
(JSC::Heap::collectAsync):
69+
(JSC::Heap::runBeginPhase):
70+
(JSC::Heap::waitForCollector):
71+
(JSC::Heap::requestCollection):
72+
(JSC::Heap::notifyIsSafeToCollect):
73+
* heap/SlotVisitor.cpp:
74+
(JSC::SlotVisitor::didReachTermination):
75+
* inspector/agents/InspectorScriptProfilerAgent.cpp:
76+
(Inspector::InspectorScriptProfilerAgent::startTracking):
77+
(Inspector::InspectorScriptProfilerAgent::trackingComplete):
78+
(Inspector::InspectorScriptProfilerAgent::stopSamplingWhenDisconnecting):
79+
* inspector/remote/RemoteConnectionToTarget.cpp:
80+
(Inspector::RemoteConnectionToTarget::setup):
81+
(Inspector::RemoteConnectionToTarget::sendMessageToTarget):
82+
(Inspector::RemoteConnectionToTarget::close):
83+
(Inspector::RemoteConnectionToTarget::targetClosed):
84+
* inspector/remote/RemoteInspector.cpp:
85+
(Inspector::RemoteInspector::registerTarget):
86+
(Inspector::RemoteInspector::unregisterTarget):
87+
(Inspector::RemoteInspector::updateTarget):
88+
(Inspector::RemoteInspector::updateClientCapabilities):
89+
(Inspector::RemoteInspector::setClient):
90+
(Inspector::RemoteInspector::setupFailed):
91+
(Inspector::RemoteInspector::setupCompleted):
92+
(Inspector::RemoteInspector::stop):
93+
* inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm:
94+
(Inspector::RemoteTargetHandleRunSourceGlobal):
95+
(Inspector::RemoteTargetQueueTaskOnGlobalQueue):
96+
(Inspector::RemoteTargetHandleRunSourceWithInfo):
97+
(Inspector::RemoteConnectionToTarget::setup):
98+
(Inspector::RemoteConnectionToTarget::targetClosed):
99+
(Inspector::RemoteConnectionToTarget::close):
100+
(Inspector::RemoteConnectionToTarget::sendMessageToTarget):
101+
(Inspector::RemoteConnectionToTarget::queueTaskOnPrivateRunLoop):
102+
* inspector/remote/cocoa/RemoteInspectorCocoa.mm:
103+
(Inspector::RemoteInspector::updateAutomaticInspectionCandidate):
104+
(Inspector::RemoteInspector::sendMessageToRemote):
105+
(Inspector::RemoteInspector::start):
106+
(Inspector::RemoteInspector::setupXPCConnectionIfNeeded):
107+
(Inspector::RemoteInspector::setParentProcessInformation):
108+
(Inspector::RemoteInspector::xpcConnectionReceivedMessage):
109+
(Inspector::RemoteInspector::xpcConnectionFailed):
110+
(Inspector::RemoteInspector::pushListingsSoon):
111+
(Inspector::RemoteInspector::receivedIndicateMessage):
112+
(Inspector::RemoteInspector::receivedProxyApplicationSetupMessage):
113+
* inspector/remote/cocoa/RemoteInspectorXPCConnection.mm:
114+
(Inspector::RemoteInspectorXPCConnection::close):
115+
(Inspector::RemoteInspectorXPCConnection::closeFromMessage):
116+
(Inspector::RemoteInspectorXPCConnection::deserializeMessage):
117+
(Inspector::RemoteInspectorXPCConnection::handleEvent):
118+
* inspector/remote/glib/RemoteInspectorGlib.cpp:
119+
(Inspector::RemoteInspector::start):
120+
(Inspector::RemoteInspector::setupConnection):
121+
(Inspector::RemoteInspector::pushListingsSoon):
122+
(Inspector::RemoteInspector::sendMessageToRemote):
123+
(Inspector::RemoteInspector::receivedGetTargetListMessage):
124+
(Inspector::RemoteInspector::receivedDataMessage):
125+
(Inspector::RemoteInspector::receivedCloseMessage):
126+
(Inspector::RemoteInspector::setup):
127+
* inspector/remote/socket/RemoteInspectorConnectionClient.cpp:
128+
(Inspector::RemoteInspectorConnectionClient::didReceive):
129+
* inspector/remote/socket/RemoteInspectorSocket.cpp:
130+
(Inspector::RemoteInspector::didClose):
131+
(Inspector::RemoteInspector::start):
132+
(Inspector::RemoteInspector::pushListingsSoon):
133+
(Inspector::RemoteInspector::setup):
134+
(Inspector::RemoteInspector::setupInspectorClient):
135+
(Inspector::RemoteInspector::frontendDidClose):
136+
(Inspector::RemoteInspector::sendMessageToBackend):
137+
(Inspector::RemoteInspector::startAutomationSession):
138+
* inspector/remote/socket/RemoteInspectorSocketEndpoint.cpp:
139+
(Inspector::RemoteInspectorSocketEndpoint::listenInet):
140+
(Inspector::RemoteInspectorSocketEndpoint::isListening):
141+
(Inspector::RemoteInspectorSocketEndpoint::workerThread):
142+
(Inspector::RemoteInspectorSocketEndpoint::createClient):
143+
(Inspector::RemoteInspectorSocketEndpoint::disconnect):
144+
(Inspector::RemoteInspectorSocketEndpoint::invalidateClient):
145+
(Inspector::RemoteInspectorSocketEndpoint::invalidateListener):
146+
(Inspector::RemoteInspectorSocketEndpoint::getPort const):
147+
(Inspector::RemoteInspectorSocketEndpoint::recvIfEnabled):
148+
(Inspector::RemoteInspectorSocketEndpoint::sendIfEnabled):
149+
(Inspector::RemoteInspectorSocketEndpoint::send):
150+
(Inspector::RemoteInspectorSocketEndpoint::acceptInetSocketIfEnabled):
151+
* interpreter/CLoopStack.cpp:
152+
(JSC::CLoopStack::addToCommittedByteCount):
153+
(JSC::CLoopStack::committedByteCount):
154+
* jit/ExecutableAllocator.cpp:
155+
(JSC::dumpJITMemory):
156+
* jit/ICStats.cpp:
157+
(JSC::ICStats::ICStats):
158+
(JSC::ICStats::~ICStats):
159+
* jit/JITThunks.cpp:
160+
(JSC::JITThunks::ctiStub):
161+
(JSC::JITThunks::existingCTIStub):
162+
(JSC::JITThunks::ctiSlowPathFunctionStub):
163+
* jit/JITWorklist.cpp:
164+
(JSC::JITWorklist::Plan::compileInThread):
165+
(JSC::JITWorklist::Plan::isFinishedCompiling):
166+
(JSC::JITWorklist::JITWorklist):
167+
(JSC::JITWorklist::completeAllForVM):
168+
(JSC::JITWorklist::poll):
169+
(JSC::JITWorklist::compileLater):
170+
(JSC::JITWorklist::finalizePlans):
171+
* parser/SourceProvider.cpp:
172+
(JSC::SourceProvider::getID):
173+
* profiler/ProfilerDatabase.cpp:
174+
(JSC::Profiler::Database::ensureBytecodesFor):
175+
(JSC::Profiler::Database::notifyDestruction):
176+
(JSC::Profiler::Database::addCompilation):
177+
(JSC::Profiler::Database::logEvent):
178+
(JSC::Profiler::Database::addDatabaseToAtExit):
179+
(JSC::Profiler::Database::removeDatabaseFromAtExit):
180+
(JSC::Profiler::Database::removeFirstAtExitDatabase):
181+
* profiler/ProfilerUID.cpp:
182+
(JSC::Profiler::UID::create):
183+
* runtime/DeferredWorkTimer.cpp:
184+
(JSC::DeferredWorkTimer::scheduleWorkSoon):
185+
(JSC::DeferredWorkTimer::didResumeScriptExecutionOwner):
186+
* runtime/SamplingProfiler.cpp:
187+
(JSC::SamplingProfiler::timerLoop):
188+
(JSC::SamplingProfiler::shutdown):
189+
(JSC::SamplingProfiler::start):
190+
(JSC::SamplingProfiler::noticeCurrentThreadAsJSCExecutionThread):
191+
(JSC::SamplingProfiler::noticeJSLockAcquisition):
192+
(JSC::SamplingProfiler::noticeVMEntry):
193+
(JSC::SamplingProfiler::registerForReportAtExit):
194+
* runtime/Watchdog.cpp:
195+
(JSC::Watchdog::startTimer):
196+
(JSC::Watchdog::willDestroyVM):
197+
* tools/VMInspector.cpp:
198+
(JSC::VMInspector::isValidExecutableMemory):
199+
* wasm/WasmBBQPlan.cpp:
200+
(JSC::Wasm::BBQPlan::work):
201+
* wasm/WasmEntryPlan.cpp:
202+
(JSC::Wasm::EntryPlan::ThreadCountHolder::ThreadCountHolder):
203+
(JSC::Wasm::EntryPlan::ThreadCountHolder::~ThreadCountHolder):
204+
* wasm/WasmOMGPlan.cpp:
205+
(JSC::Wasm::OMGPlan::work):
206+
* wasm/WasmPlan.cpp:
207+
(JSC::Wasm::Plan::addCompletionTask):
208+
(JSC::Wasm::Plan::waitForCompletion):
209+
(JSC::Wasm::Plan::tryRemoveContextAndCancelIfLast):
210+
* wasm/WasmSignature.cpp:
211+
(JSC::Wasm::SignatureInformation::signatureFor):
212+
(JSC::Wasm::SignatureInformation::tryCleanup):
213+
* wasm/WasmWorklist.cpp:
214+
(JSC::Wasm::Worklist::enqueue):
215+
(JSC::Wasm::Worklist::completePlanSynchronously):
216+
(JSC::Wasm::Worklist::stopAllPlansForContext):
217+
(JSC::Wasm::Worklist::Worklist):
218+
(JSC::Wasm::Worklist::~Worklist):
219+
1220
2021-05-22 Commit Queue <[email protected]>
2221

3222
Unreviewed, reverting r277913.

Source/JavaScriptCore/assembler/testmasm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2724,7 +2724,7 @@ void run(const char* filter)
27242724
for (;;) {
27252725
RefPtr<SharedTask<void()>> task;
27262726
{
2727-
LockHolder locker(lock);
2727+
Locker locker { lock };
27282728
if (tasks.isEmpty())
27292729
return;
27302730
task = tasks.takeFirst();

Source/JavaScriptCore/b3/air/testair.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ void loadConstantImpl(BasicBlock* block, T value, B3::Air::Opcode move, Tmp tmp,
129129
static Lock lock;
130130
static StdMap<T, T*>* map; // I'm not messing with HashMap's problems with integers.
131131

132-
LockHolder locker(lock);
132+
Locker locker { lock };
133133
if (!map)
134134
map = new StdMap<T, T*>();
135135

@@ -2469,7 +2469,7 @@ void run(const char* filter)
24692469
for (;;) {
24702470
RefPtr<SharedTask<void()>> task;
24712471
{
2472-
LockHolder locker(lock);
2472+
Locker locker { lock };
24732473
if (tasks.isEmpty())
24742474
return;
24752475
task = tasks.takeFirst();

Source/JavaScriptCore/b3/testb3_1.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ void run(const char* filter)
867867
for (;;) {
868868
RefPtr<SharedTask<void()>> task;
869869
{
870-
LockHolder locker(lock);
870+
Locker locker { lock };
871871
if (tasks.isEmpty())
872872
return;
873873
task = tasks.takeFirst();

Source/JavaScriptCore/bytecode/DirectEvalCodeCache.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@ void DirectEvalCodeCache::setSlow(JSGlobalObject* globalObject, JSCell* owner, c
3535
if (!evalExecutable->allowDirectEvalCache())
3636
return;
3737

38-
LockHolder locker(m_lock);
38+
Locker locker { m_lock };
3939
m_cacheMap.set(CacheKey(evalSource, callSiteIndex), WriteBarrier<DirectEvalExecutable>(globalObject->vm(), owner, evalExecutable));
4040
}
4141

4242
void DirectEvalCodeCache::clear()
4343
{
44-
LockHolder locker(m_lock);
44+
Locker locker { m_lock };
4545
m_cacheMap.clear();
4646
}
4747

4848
template<typename Visitor>
4949
void DirectEvalCodeCache::visitAggregateImpl(Visitor& visitor)
5050
{
51-
LockHolder locker(m_lock);
51+
Locker locker { m_lock };
5252
EvalCacheMap::iterator end = m_cacheMap.end();
5353
for (EvalCacheMap::iterator ptr = m_cacheMap.begin(); ptr != end; ++ptr)
5454
visitor.append(ptr->value);

Source/JavaScriptCore/bytecode/SuperSampler.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void initializeSuperSampler()
5353
for (;;) {
5454
for (int ms = 0; ms < printingPeriod; ms += sleepQuantum) {
5555
if (g_superSamplerEnabled) {
56-
LockHolder locker(lock);
56+
Locker locker { lock };
5757
if (g_superSamplerCount)
5858
in++;
5959
else
@@ -70,7 +70,7 @@ void initializeSuperSampler()
7070

7171
void resetSuperSamplerState()
7272
{
73-
LockHolder locker(lock);
73+
Locker locker { lock };
7474
in = 0;
7575
out = 0;
7676
}
@@ -80,7 +80,7 @@ void printSuperSamplerState()
8080
if (!Options::useSuperSampler())
8181
return;
8282

83-
LockHolder locker(lock);
83+
Locker locker { lock };
8484
double percentage = 100.0 * in / (in + out);
8585
if (percentage != percentage)
8686
percentage = 0.0;
@@ -89,13 +89,13 @@ void printSuperSamplerState()
8989

9090
void enableSuperSampler()
9191
{
92-
LockHolder locker(lock);
92+
Locker locker { lock };
9393
g_superSamplerEnabled = true;
9494
}
9595

9696
void disableSuperSampler()
9797
{
98-
LockHolder locker(lock);
98+
Locker locker { lock };
9999
g_superSamplerEnabled = false;
100100
}
101101

0 commit comments

Comments
 (0)