Changeset 187972 in webkit
- Timestamp:
- Aug 5, 2015, 12:20:22 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 130 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r187969 r187972 1 2015-08-04 Filip Pizlo <[email protected]> 2 3 Rename Mutex to DeprecatedMutex 4 https://bugs.webkit.org/show_bug.cgi?id=147675 5 6 Reviewed by Geoffrey Garen. 7 8 * bytecode/SamplingTool.cpp: 9 (JSC::SamplingTool::doRun): 10 (JSC::SamplingTool::notifyOfScope): 11 * bytecode/SamplingTool.h: 12 * dfg/DFGThreadData.h: 13 * dfg/DFGWorklist.cpp: 14 (JSC::DFG::Worklist::~Worklist): 15 (JSC::DFG::Worklist::isActiveForVM): 16 (JSC::DFG::Worklist::enqueue): 17 (JSC::DFG::Worklist::compilationState): 18 (JSC::DFG::Worklist::waitUntilAllPlansForVMAreReady): 19 (JSC::DFG::Worklist::removeAllReadyPlansForVM): 20 (JSC::DFG::Worklist::completeAllReadyPlansForVM): 21 (JSC::DFG::Worklist::visitWeakReferences): 22 (JSC::DFG::Worklist::removeDeadPlans): 23 (JSC::DFG::Worklist::queueLength): 24 (JSC::DFG::Worklist::dump): 25 (JSC::DFG::Worklist::runThread): 26 * dfg/DFGWorklist.h: 27 * disassembler/Disassembler.cpp: 28 * heap/CopiedSpace.cpp: 29 (JSC::CopiedSpace::doneFillingBlock): 30 (JSC::CopiedSpace::doneCopying): 31 * heap/CopiedSpace.h: 32 * heap/CopiedSpaceInlines.h: 33 (JSC::CopiedSpace::recycleBorrowedBlock): 34 (JSC::CopiedSpace::allocateBlockForCopyingPhase): 35 * heap/HeapTimer.h: 36 * heap/MachineStackMarker.cpp: 37 (JSC::ActiveMachineThreadsManager::Locker::Locker): 38 (JSC::ActiveMachineThreadsManager::add): 39 (JSC::ActiveMachineThreadsManager::remove): 40 (JSC::ActiveMachineThreadsManager::ActiveMachineThreadsManager): 41 (JSC::MachineThreads::~MachineThreads): 42 (JSC::MachineThreads::addCurrentThread): 43 (JSC::MachineThreads::removeThreadIfFound): 44 (JSC::MachineThreads::tryCopyOtherThreadStack): 45 (JSC::MachineThreads::tryCopyOtherThreadStacks): 46 (JSC::MachineThreads::gatherConservativeRoots): 47 * heap/MachineStackMarker.h: 48 * interpreter/JSStack.cpp: 49 (JSC::stackStatisticsMutex): 50 (JSC::JSStack::addToCommittedByteCount): 51 (JSC::JSStack::committedByteCount): 52 * jit/JITThunks.h: 53 * profiler/ProfilerDatabase.h: 54 1 55 2015-08-05 Saam barati <[email protected]> 2 56 -
trunk/Source/JavaScriptCore/bytecode/SamplingTool.cpp
r165676 r187972 286 286 #if ENABLE(CODEBLOCK_SAMPLING) 287 287 if (CodeBlock* codeBlock = sample.codeBlock()) { 288 MutexLocker locker(m_scriptSampleMapMutex);288 DeprecatedMutexLocker locker(m_scriptSampleMapMutex); 289 289 ScriptSampleRecord* record = m_scopeSampleMap->get(codeBlock->ownerExecutable()); 290 290 ASSERT(record); … … 302 302 { 303 303 #if ENABLE(CODEBLOCK_SAMPLING) 304 MutexLocker locker(m_scriptSampleMapMutex);304 DeprecatedMutexLocker locker(m_scriptSampleMapMutex); 305 305 m_scopeSampleMap->set(script, adoptPtr(new ScriptSampleRecord(vm, script))); 306 306 #else -
trunk/Source/JavaScriptCore/bytecode/SamplingTool.h
r187587 r187972 339 339 340 340 #if ENABLE(CODEBLOCK_SAMPLING) 341 Mutex m_scriptSampleMapMutex;341 DeprecatedMutex m_scriptSampleMapMutex; 342 342 std::unique_ptr<ScriptSampleRecordMap> m_scopeSampleMap; 343 343 #endif -
trunk/Source/JavaScriptCore/dfg/DFGThreadData.h
r187587 r187972 49 49 Worklist* m_worklist; 50 50 ThreadIdentifier m_identifier; 51 Mutex m_rightToRun;51 DeprecatedMutex m_rightToRun; 52 52 Safepoint* m_safepoint; 53 53 }; -
trunk/Source/JavaScriptCore/dfg/DFGWorklist.cpp
r185346 r187972 47 47 { 48 48 { 49 MutexLocker locker(m_lock);49 DeprecatedMutexLocker locker(m_lock); 50 50 for (unsigned i = m_threads.size(); i--;) 51 51 m_queue.append(nullptr); // Use null plan to indicate that we want the thread to terminate. … … 78 78 bool Worklist::isActiveForVM(VM& vm) const 79 79 { 80 MutexLocker locker(m_lock);80 DeprecatedMutexLocker locker(m_lock); 81 81 PlanMap::const_iterator end = m_plans.end(); 82 82 for (PlanMap::const_iterator iter = m_plans.begin(); iter != end; ++iter) { … … 90 90 { 91 91 RefPtr<Plan> plan = passedPlan; 92 MutexLocker locker(m_lock);92 DeprecatedMutexLocker locker(m_lock); 93 93 if (Options::verboseCompilationQueue()) { 94 94 dump(locker, WTF::dataFile()); … … 103 103 Worklist::State Worklist::compilationState(CompilationKey key) 104 104 { 105 MutexLocker locker(m_lock);105 DeprecatedMutexLocker locker(m_lock); 106 106 PlanMap::iterator iter = m_plans.find(key); 107 107 if (iter == m_plans.end()) … … 119 119 // be adding plans, our VM will not be. 120 120 121 MutexLocker locker(m_lock);121 DeprecatedMutexLocker locker(m_lock); 122 122 123 123 if (Options::verboseCompilationQueue()) { … … 148 148 { 149 149 DeferGC deferGC(vm.heap); 150 MutexLocker locker(m_lock);150 DeprecatedMutexLocker locker(m_lock); 151 151 for (size_t i = 0; i < m_readyPlans.size(); ++i) { 152 152 RefPtr<Plan> plan = m_readyPlans[i]; … … 193 193 194 194 if (!!requestedKey && resultingState == NotKnown) { 195 MutexLocker locker(m_lock);195 DeprecatedMutexLocker locker(m_lock); 196 196 if (m_plans.contains(requestedKey)) 197 197 resultingState = Compiling; … … 226 226 VM* vm = visitor.heap()->vm(); 227 227 { 228 MutexLocker locker(m_lock);228 DeprecatedMutexLocker locker(m_lock); 229 229 for (PlanMap::iterator iter = m_plans.begin(); iter != m_plans.end(); ++iter) { 230 230 Plan* plan = iter->value.get(); … … 249 249 { 250 250 { 251 MutexLocker locker(m_lock);251 DeprecatedMutexLocker locker(m_lock); 252 252 HashSet<CompilationKey> deadPlanKeys; 253 253 for (PlanMap::iterator iter = m_plans.begin(); iter != m_plans.end(); ++iter) { … … 296 296 size_t Worklist::queueLength() 297 297 { 298 MutexLocker locker(m_lock);298 DeprecatedMutexLocker locker(m_lock); 299 299 return m_queue.size(); 300 300 } … … 302 302 void Worklist::dump(PrintStream& out) const 303 303 { 304 MutexLocker locker(m_lock);304 DeprecatedMutexLocker locker(m_lock); 305 305 dump(locker, out); 306 306 } 307 307 308 void Worklist::dump(const MutexLocker&, PrintStream& out) const308 void Worklist::dump(const DeprecatedMutexLocker&, PrintStream& out) const 309 309 { 310 310 out.print( … … 326 326 RefPtr<Plan> plan; 327 327 { 328 MutexLocker locker(m_lock);328 DeprecatedMutexLocker locker(m_lock); 329 329 while (m_queue.isEmpty()) 330 330 m_planEnqueued.wait(m_lock); … … 342 342 343 343 { 344 MutexLocker locker(data->m_rightToRun);344 DeprecatedMutexLocker locker(data->m_rightToRun); 345 345 { 346 MutexLocker locker(m_lock);346 DeprecatedMutexLocker locker(m_lock); 347 347 if (plan->stage == Plan::Cancelled) { 348 348 m_numberOfActiveThreads--; … … 360 360 361 361 { 362 MutexLocker locker(m_lock);362 DeprecatedMutexLocker locker(m_lock); 363 363 if (plan->stage == Plan::Cancelled) { 364 364 m_numberOfActiveThreads--; … … 371 371 372 372 { 373 MutexLocker locker(m_lock);373 DeprecatedMutexLocker locker(m_lock); 374 374 375 375 // We could have been cancelled between releasing rightToRun and acquiring m_lock. -
trunk/Source/JavaScriptCore/dfg/DFGWorklist.h
r185346 r187972 86 86 void removeAllReadyPlansForVM(VM&, Vector<RefPtr<Plan>, 8>&); 87 87 88 void dump(const MutexLocker&, PrintStream&) const;88 void dump(const DeprecatedMutexLocker&, PrintStream&) const; 89 89 90 90 CString m_threadName; … … 104 104 Vector<RefPtr<Plan>, 16> m_readyPlans; 105 105 106 Mutex m_suspensionLock;106 DeprecatedMutex m_suspensionLock; 107 107 108 mutable Mutex m_lock;108 mutable DeprecatedMutex m_lock; 109 109 ThreadCondition m_planEnqueued; 110 110 ThreadCondition m_planCompiled; -
trunk/Source/JavaScriptCore/disassembler/Disassembler.cpp
r181887 r187972 79 79 void enqueue(std::unique_ptr<DisassemblyTask> task) 80 80 { 81 MutexLocker locker(m_lock);81 DeprecatedMutexLocker locker(m_lock); 82 82 m_queue.append(WTF::move(task)); 83 83 m_condition.broadcast(); … … 86 86 void waitUntilEmpty() 87 87 { 88 MutexLocker locker(m_lock);88 DeprecatedMutexLocker locker(m_lock); 89 89 while (!m_queue.isEmpty() || m_working) 90 90 m_condition.wait(m_lock); … … 97 97 std::unique_ptr<DisassemblyTask> task; 98 98 { 99 MutexLocker locker(m_lock);99 DeprecatedMutexLocker locker(m_lock); 100 100 m_working = false; 101 101 m_condition.broadcast(); … … 113 113 } 114 114 115 Mutex m_lock;115 DeprecatedMutex m_lock; 116 116 ThreadCondition m_condition; 117 117 Deque<std::unique_ptr<DisassemblyTask>> m_queue; -
trunk/Source/JavaScriptCore/heap/CopiedSpace.cpp
r183974 r187972 199 199 200 200 { 201 MutexLocker locker(m_loanedBlocksLock);201 DeprecatedMutexLocker locker(m_loanedBlocksLock); 202 202 ASSERT(m_numberOfLoanedBlocks > 0); 203 203 ASSERT(m_inCopyingPhase); … … 232 232 { 233 233 { 234 MutexLocker locker(m_loanedBlocksLock);234 DeprecatedMutexLocker locker(m_loanedBlocksLock); 235 235 while (m_numberOfLoanedBlocks > 0) 236 236 m_loanedBlocksCondition.wait(m_loanedBlocksLock); -
trunk/Source/JavaScriptCore/heap/CopiedSpace.h
r186397 r187972 139 139 bool m_shouldDoCopyPhase; 140 140 141 Mutex m_loanedBlocksLock;141 DeprecatedMutex m_loanedBlocksLock; 142 142 ThreadCondition m_loanedBlocksCondition; 143 143 size_t m_numberOfLoanedBlocks; -
trunk/Source/JavaScriptCore/heap/CopiedSpaceInlines.h
r186397 r187972 114 114 115 115 { 116 MutexLocker locker(m_loanedBlocksLock);116 DeprecatedMutexLocker locker(m_loanedBlocksLock); 117 117 ASSERT(m_numberOfLoanedBlocks > 0); 118 118 ASSERT(m_inCopyingPhase); … … 129 129 130 130 { 131 MutexLocker locker(m_loanedBlocksLock);131 DeprecatedMutexLocker locker(m_loanedBlocksLock); 132 132 m_numberOfLoanedBlocks++; 133 133 } -
trunk/Source/JavaScriptCore/heap/HeapTimer.h
r166149 r187972 60 60 CFRunLoopTimerContext m_context; 61 61 62 Mutex m_shutdownMutex;62 DeprecatedMutex m_shutdownMutex; 63 63 #elif PLATFORM(EFL) 64 64 static bool timerEvent(void*); -
trunk/Source/JavaScriptCore/heap/MachineStackMarker.cpp
r187026 r187972 104 104 105 105 private: 106 MutexLocker m_locker;106 DeprecatedMutexLocker m_locker; 107 107 }; 108 108 109 109 void add(MachineThreads* machineThreads) 110 110 { 111 MutexLocker managerLock(m_lock);111 DeprecatedMutexLocker managerLock(m_lock); 112 112 m_set.add(machineThreads); 113 113 } … … 115 115 void remove(MachineThreads* machineThreads) 116 116 { 117 MutexLocker managerLock(m_lock);117 DeprecatedMutexLocker managerLock(m_lock); 118 118 auto recordedMachineThreads = m_set.take(machineThreads); 119 119 RELEASE_ASSERT(recordedMachineThreads = machineThreads); … … 130 130 ActiveMachineThreadsManager() { } 131 131 132 Mutex m_lock;132 DeprecatedMutex m_lock; 133 133 MachineThreadsSet m_set; 134 134 … … 264 264 threadSpecificKeyDelete(m_threadSpecific); 265 265 266 MutexLocker registeredThreadsLock(m_registeredThreadsMutex);266 DeprecatedMutexLocker registeredThreadsLock(m_registeredThreadsMutex); 267 267 for (Thread* t = m_registeredThreads; t;) { 268 268 Thread* next = t->next; … … 295 295 Thread* thread = Thread::createForCurrentThread(); 296 296 297 MutexLocker lock(m_registeredThreadsMutex);297 DeprecatedMutexLocker lock(m_registeredThreadsMutex); 298 298 299 299 thread->next = m_registeredThreads; … … 319 319 void MachineThreads::removeThreadIfFound(PlatformThread platformThread) 320 320 { 321 MutexLocker lock(m_registeredThreadsMutex);321 DeprecatedMutexLocker lock(m_registeredThreadsMutex); 322 322 Thread* t = m_registeredThreads; 323 323 if (*t == platformThread) { … … 565 565 } 566 566 567 bool MachineThreads::tryCopyOtherThreadStacks( MutexLocker&, void* buffer, size_t capacity, size_t* size)567 bool MachineThreads::tryCopyOtherThreadStacks(DeprecatedMutexLocker&, void* buffer, size_t capacity, size_t* size) 568 568 { 569 569 // Prevent two VMs from suspending each other's threads at the same time, … … 659 659 size_t capacity = 0; 660 660 void* buffer = nullptr; 661 MutexLocker lock(m_registeredThreadsMutex);661 DeprecatedMutexLocker lock(m_registeredThreadsMutex); 662 662 while (!tryCopyOtherThreadStacks(lock, buffer, capacity, &size)) 663 663 growBuffer(size, &buffer, &capacity); -
trunk/Source/JavaScriptCore/heap/MachineStackMarker.h
r187819 r187972 53 53 54 54 void tryCopyOtherThreadStack(Thread*, void*, size_t capacity, size_t*); 55 bool tryCopyOtherThreadStacks( MutexLocker&, void*, size_t capacity, size_t*);55 bool tryCopyOtherThreadStacks(DeprecatedMutexLocker&, void*, size_t capacity, size_t*); 56 56 57 57 static void removeThread(void*); … … 60 60 void removeThreadIfFound(PlatformThread); 61 61 62 Mutex m_registeredThreadsMutex;62 DeprecatedMutex m_registeredThreadsMutex; 63 63 Thread* m_registeredThreads; 64 64 WTF::ThreadSpecificKey m_threadSpecific; -
trunk/Source/JavaScriptCore/interpreter/JSStack.cpp
r182364 r187972 40 40 static size_t committedBytesCount = 0; 41 41 42 static Mutex& stackStatisticsMutex()42 static DeprecatedMutex& stackStatisticsMutex() 43 43 { 44 DEPRECATED_DEFINE_STATIC_LOCAL( Mutex, staticMutex, ());44 DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, staticMutex, ()); 45 45 return staticMutex; 46 46 } … … 147 147 void JSStack::addToCommittedByteCount(long byteCount) 148 148 { 149 MutexLocker locker(stackStatisticsMutex());149 DeprecatedMutexLocker locker(stackStatisticsMutex()); 150 150 ASSERT(static_cast<long>(committedBytesCount) + byteCount > -1); 151 151 committedBytesCount += byteCount; … … 177 177 { 178 178 #if !ENABLE(JIT) 179 MutexLocker locker(stackStatisticsMutex());179 DeprecatedMutexLocker locker(stackStatisticsMutex()); 180 180 return committedBytesCount; 181 181 #else -
trunk/Source/JavaScriptCore/jit/JITThunks.h
r182068 r187972 65 65 private: 66 66 // Main thread can hold this lock for a while, so use an adaptive mutex. 67 typedef Mutex Lock;68 typedef MutexLocker Locker;67 typedef DeprecatedMutex Lock; 68 typedef DeprecatedMutexLocker Locker; 69 69 70 70 void finalize(Handle<Unknown>, void* context) override; -
trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.h
r157653 r187972 82 82 // power-aware backoff. An adaptive mutex will do this as a matter of course, 83 83 // but a spinlock won't. 84 typedef Mutex Lock;85 typedef MutexLocker Locker;84 typedef DeprecatedMutex Lock; 85 typedef DeprecatedMutexLocker Locker; 86 86 87 87 -
trunk/Source/WTF/ChangeLog
r187918 r187972 1 2015-08-04 Filip Pizlo <[email protected]> 2 3 Rename Mutex to DeprecatedMutex 4 https://bugs.webkit.org/show_bug.cgi?id=147675 5 6 Reviewed by Geoffrey Garen. 7 8 * wtf/Atomics.cpp: 9 (WTF::getSwapLock): 10 (WTF::atomicStep): 11 * wtf/MessageQueue.h: 12 (WTF::MessageQueue::infiniteTime): 13 (WTF::MessageQueue<DataType>::append): 14 (WTF::MessageQueue<DataType>::appendAndKill): 15 (WTF::MessageQueue<DataType>::appendAndCheckEmpty): 16 (WTF::MessageQueue<DataType>::prepend): 17 (WTF::MessageQueue<DataType>::removeIf): 18 (WTF::MessageQueue<DataType>::isEmpty): 19 (WTF::MessageQueue<DataType>::kill): 20 (WTF::MessageQueue<DataType>::killed): 21 * wtf/ParallelJobsGeneric.cpp: 22 (WTF::ParallelEnvironment::ThreadPrivate::execute): 23 (WTF::ParallelEnvironment::ThreadPrivate::waitForFinish): 24 (WTF::ParallelEnvironment::ThreadPrivate::workerThread): 25 * wtf/ParallelJobsGeneric.h: 26 * wtf/RunLoop.cpp: 27 (WTF::RunLoop::performWork): 28 (WTF::RunLoop::dispatch): 29 * wtf/RunLoop.h: 30 * wtf/Threading.cpp: 31 (WTF::threadEntryPoint): 32 (WTF::createThread): 33 * wtf/ThreadingPrimitives.h: 34 * wtf/ThreadingPthreads.cpp: 35 (WTF::threadMapMutex): 36 (WTF::initializeThreading): 37 (WTF::identifierByPthreadHandle): 38 (WTF::establishIdentifierForPthreadHandle): 39 (WTF::changeThreadPriority): 40 (WTF::waitForThreadCompletion): 41 (WTF::detachThread): 42 (WTF::threadDidExit): 43 (WTF::currentThread): 44 (WTF::DeprecatedMutex::DeprecatedMutex): 45 (WTF::DeprecatedMutex::~DeprecatedMutex): 46 (WTF::DeprecatedMutex::lock): 47 (WTF::DeprecatedMutex::tryLock): 48 (WTF::DeprecatedMutex::unlock): 49 (WTF::ThreadCondition::~ThreadCondition): 50 (WTF::ThreadCondition::wait): 51 (WTF::ThreadCondition::timedWait): 52 (WTF::Mutex::Mutex): Deleted. 53 (WTF::Mutex::~Mutex): Deleted. 54 (WTF::Mutex::lock): Deleted. 55 (WTF::Mutex::tryLock): Deleted. 56 (WTF::Mutex::unlock): Deleted. 57 * wtf/ThreadingWin.cpp: 58 (WTF::initializeCurrentThreadInternal): 59 (WTF::threadMapMutex): 60 (WTF::initializeThreading): 61 (WTF::storeThreadHandleByIdentifier): 62 (WTF::threadHandleForIdentifier): 63 (WTF::clearThreadHandleForIdentifier): 64 (WTF::currentThread): 65 (WTF::DeprecatedMutex::DeprecatedMutex): 66 (WTF::DeprecatedMutex::~DeprecatedMutex): 67 (WTF::DeprecatedMutex::lock): 68 (WTF::DeprecatedMutex::tryLock): 69 (WTF::DeprecatedMutex::unlock): 70 (WTF::ThreadCondition::~ThreadCondition): 71 (WTF::ThreadCondition::wait): 72 (WTF::ThreadCondition::timedWait): 73 (WTF::Mutex::Mutex): Deleted. 74 (WTF::Mutex::~Mutex): Deleted. 75 (WTF::Mutex::lock): Deleted. 76 (WTF::Mutex::tryLock): Deleted. 77 (WTF::Mutex::unlock): Deleted. 78 * wtf/WorkQueue.h: 79 * wtf/dtoa.cpp: 80 * wtf/dtoa.h: 81 * wtf/efl/DispatchQueueEfl.cpp: 82 (DispatchQueue::dispatch): 83 (DispatchQueue::performWork): 84 (DispatchQueue::performTimerWork): 85 (DispatchQueue::insertTimerWorkItem): 86 (DispatchQueue::wakeUpThread): 87 (DispatchQueue::getNextTimeOut): 88 * wtf/efl/DispatchQueueEfl.h: 89 * wtf/efl/RunLoopEfl.cpp: 90 (WTF::RunLoop::wakeUpEvent): 91 (WTF::RunLoop::wakeUp): 92 * wtf/threads/BinarySemaphore.cpp: 93 (WTF::BinarySemaphore::signal): 94 (WTF::BinarySemaphore::wait): 95 * wtf/threads/BinarySemaphore.h: 96 * wtf/win/WorkQueueWin.cpp: 97 (WTF::WorkQueue::handleCallback): 98 (WTF::WorkQueue::platformInvalidate): 99 (WTF::WorkQueue::dispatch): 100 (WTF::WorkQueue::timerCallback): 101 (WTF::WorkQueue::dispatchAfter): 102 1 103 2015-08-04 Alex Christensen <[email protected]> 2 104 -
trunk/Source/WTF/wtf/Atomics.cpp
r187819 r187972 73 73 74 74 static const size_t kSwapLockCount = 32; 75 static Mutex s_swapLocks[kSwapLockCount];75 static DeprecatedMutex s_swapLocks[kSwapLockCount]; 76 76 77 static inline Mutex& getSwapLock(const volatile int64_t* addr)77 static inline DeprecatedMutex& getSwapLock(const volatile int64_t* addr) 78 78 { 79 79 return s_swapLocks[(reinterpret_cast<intptr_t>(addr) >> 3U) % kSwapLockCount]; … … 82 82 static int64_t atomicStep(int64_t volatile* addend, int64_t step) 83 83 { 84 Mutex& mutex = getSwapLock(addend);84 DeprecatedMutex& mutex = getSwapLock(addend); 85 85 86 86 mutex.lock(); -
trunk/Source/WTF/wtf/MessageQueue.h
r170774 r187972 78 78 79 79 private: 80 mutable Mutex m_mutex;80 mutable DeprecatedMutex m_mutex; 81 81 ThreadCondition m_condition; 82 82 Deque<std::unique_ptr<DataType>> m_queue; … … 92 92 inline void MessageQueue<DataType>::append(std::unique_ptr<DataType> message) 93 93 { 94 MutexLocker lock(m_mutex);94 DeprecatedMutexLocker lock(m_mutex); 95 95 m_queue.append(WTF::move(message)); 96 96 m_condition.signal(); … … 100 100 inline void MessageQueue<DataType>::appendAndKill(std::unique_ptr<DataType> message) 101 101 { 102 MutexLocker lock(m_mutex);102 DeprecatedMutexLocker lock(m_mutex); 103 103 m_queue.append(WTF::move(message)); 104 104 m_killed = true; … … 110 110 inline bool MessageQueue<DataType>::appendAndCheckEmpty(std::unique_ptr<DataType> message) 111 111 { 112 MutexLocker lock(m_mutex);112 DeprecatedMutexLocker lock(m_mutex); 113 113 bool wasEmpty = m_queue.isEmpty(); 114 114 m_queue.append(WTF::move(message)); … … 120 120 inline void MessageQueue<DataType>::prepend(std::unique_ptr<DataType> message) 121 121 { 122 MutexLocker lock(m_mutex);122 DeprecatedMutexLocker lock(m_mutex); 123 123 m_queue.prepend(WTF::move(message)); 124 124 m_condition.signal(); … … 138 138 inline auto MessageQueue<DataType>::waitForMessageFilteredWithTimeout(MessageQueueWaitResult& result, Predicate&& predicate, double absoluteTime) -> std::unique_ptr<DataType> 139 139 { 140 MutexLocker lock(m_mutex);140 DeprecatedMutexLocker lock(m_mutex); 141 141 bool timedOut = false; 142 142 … … 175 175 inline auto MessageQueue<DataType>::tryGetMessage() -> std::unique_ptr<DataType> 176 176 { 177 MutexLocker lock(m_mutex);177 DeprecatedMutexLocker lock(m_mutex); 178 178 if (m_killed) 179 179 return nullptr; … … 187 187 inline auto MessageQueue<DataType>::tryGetMessageIgnoringKilled() -> std::unique_ptr<DataType> 188 188 { 189 MutexLocker lock(m_mutex);189 DeprecatedMutexLocker lock(m_mutex); 190 190 if (m_queue.isEmpty()) 191 191 return nullptr; … … 198 198 inline void MessageQueue<DataType>::removeIf(Predicate&& predicate) 199 199 { 200 MutexLocker lock(m_mutex);200 DeprecatedMutexLocker lock(m_mutex); 201 201 while (true) { 202 202 auto found = m_queue.findIf([&predicate](const std::unique_ptr<DataType>& ptr) -> bool { … … 215 215 inline bool MessageQueue<DataType>::isEmpty() 216 216 { 217 MutexLocker lock(m_mutex);217 DeprecatedMutexLocker lock(m_mutex); 218 218 if (m_killed) 219 219 return true; … … 224 224 inline void MessageQueue<DataType>::kill() 225 225 { 226 MutexLocker lock(m_mutex);226 DeprecatedMutexLocker lock(m_mutex); 227 227 m_killed = true; 228 228 m_condition.broadcast(); … … 232 232 inline bool MessageQueue<DataType>::killed() const 233 233 { 234 MutexLocker lock(m_mutex);234 DeprecatedMutexLocker lock(m_mutex); 235 235 return m_killed; 236 236 } -
trunk/Source/WTF/wtf/ParallelJobsGeneric.cpp
r111778 r187972 106 106 void ParallelEnvironment::ThreadPrivate::execute(ThreadFunction threadFunction, void* parameters) 107 107 { 108 MutexLocker lock(m_mutex);108 DeprecatedMutexLocker lock(m_mutex); 109 109 110 110 m_threadFunction = threadFunction; … … 116 116 void ParallelEnvironment::ThreadPrivate::waitForFinish() 117 117 { 118 MutexLocker lock(m_mutex);118 DeprecatedMutexLocker lock(m_mutex); 119 119 120 120 while (m_running) … … 125 125 { 126 126 ThreadPrivate* sharedThread = reinterpret_cast<ThreadPrivate*>(threadData); 127 MutexLocker lock(sharedThread->m_mutex);127 DeprecatedMutexLocker lock(sharedThread->m_mutex); 128 128 129 129 while (sharedThread->m_threadID) { -
trunk/Source/WTF/wtf/ParallelJobsGeneric.h
r112560 r187972 77 77 ParallelEnvironment* m_parent; 78 78 79 mutable Mutex m_mutex;79 mutable DeprecatedMutex m_mutex; 80 80 ThreadCondition m_threadCondition; 81 81 -
trunk/Source/WTF/wtf/RunLoop.cpp
r186006 r187972 93 93 std::function<void()> function; 94 94 { 95 MutexLocker locker(m_functionQueueLock);95 DeprecatedMutexLocker locker(m_functionQueueLock); 96 96 functionsToHandle = m_functionQueue.size(); 97 97 … … 108 108 std::function<void()> function; 109 109 { 110 MutexLocker locker(m_functionQueueLock);110 DeprecatedMutexLocker locker(m_functionQueueLock); 111 111 112 112 // Even if we start off with N functions to handle and we've only handled less than N functions, the queue … … 126 126 { 127 127 { 128 MutexLocker locker(m_functionQueueLock);128 DeprecatedMutexLocker locker(m_functionQueueLock); 129 129 m_functionQueue.append(WTF::move(function)); 130 130 } -
trunk/Source/WTF/wtf/RunLoop.h
r185502 r187972 131 131 void performWork(); 132 132 133 Mutex m_functionQueueLock;133 DeprecatedMutex m_functionQueueLock; 134 134 Deque<std::function<void ()>> m_functionQueue; 135 135 … … 148 148 int m_nestingLevel; 149 149 #elif PLATFORM(EFL) 150 Mutex m_pipeLock;150 DeprecatedMutex m_pipeLock; 151 151 EflUniquePtr<Ecore_Pipe> m_pipe; 152 152 153 Mutex m_wakeUpEventRequestedLock;153 DeprecatedMutex m_wakeUpEventRequestedLock; 154 154 bool m_wakeUpEventRequested; 155 155 -
trunk/Source/WTF/wtf/Threading.cpp
r175782 r187972 36 36 const char* name; 37 37 std::function<void()> entryPoint; 38 Mutex creationMutex;38 DeprecatedMutex creationMutex; 39 39 }; 40 40 … … 46 46 // establishing ThreadIdentifier. 47 47 { 48 MutexLocker locker(context->creationMutex);48 DeprecatedMutexLocker locker(context->creationMutex); 49 49 } 50 50 … … 71 71 72 72 // Prevent the thread body from executing until we've established the thread identifier. 73 MutexLocker locker(context->creationMutex);73 DeprecatedMutexLocker locker(context->creationMutex); 74 74 75 75 return createThreadInternal(threadEntryPoint, context, name); -
trunk/Source/WTF/wtf/ThreadingPrimitives.h
r165676 r187972 71 71 #endif 72 72 73 class Mutex {74 WTF_MAKE_NONCOPYABLE( Mutex); WTF_MAKE_FAST_ALLOCATED;73 class DeprecatedMutex { 74 WTF_MAKE_NONCOPYABLE(DeprecatedMutex); WTF_MAKE_FAST_ALLOCATED; 75 75 public: 76 WTF_EXPORT_PRIVATE Mutex();77 WTF_EXPORT_PRIVATE ~ Mutex();76 WTF_EXPORT_PRIVATE DeprecatedMutex(); 77 WTF_EXPORT_PRIVATE ~DeprecatedMutex(); 78 78 79 79 WTF_EXPORT_PRIVATE void lock(); … … 87 87 }; 88 88 89 typedef Locker< Mutex>MutexLocker;89 typedef Locker<DeprecatedMutex> DeprecatedMutexLocker; 90 90 91 91 class ThreadCondition { … … 95 95 WTF_EXPORT_PRIVATE ~ThreadCondition(); 96 96 97 WTF_EXPORT_PRIVATE void wait( Mutex& mutex);97 WTF_EXPORT_PRIVATE void wait(DeprecatedMutex&); 98 98 // Returns true if the condition was signaled before absoluteTime, false if the absoluteTime was reached or is in the past. 99 99 // The absoluteTime is in seconds, starting on January 1, 1970. The time is assumed to use the same time zone as WTF::currentTime(). 100 WTF_EXPORT_PRIVATE bool timedWait( Mutex&, double absoluteTime);100 WTF_EXPORT_PRIVATE bool timedWait(DeprecatedMutex&, double absoluteTime); 101 101 WTF_EXPORT_PRIVATE void signal(); 102 102 WTF_EXPORT_PRIVATE void broadcast(); … … 114 114 } // namespace WTF 115 115 116 using WTF:: Mutex;117 using WTF:: MutexLocker;116 using WTF::DeprecatedMutex; 117 using WTF::DeprecatedMutexLocker; 118 118 using WTF::ThreadCondition; 119 119 -
trunk/Source/WTF/wtf/ThreadingPthreads.cpp
r177023 r187972 103 103 void threadWasJoined(ThreadIdentifier); 104 104 105 static Mutex& threadMapMutex()106 { 107 DEPRECATED_DEFINE_STATIC_LOCAL( Mutex, mutex, ());105 static DeprecatedMutex& threadMapMutex() 106 { 107 DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, mutex, ()); 108 108 return mutex; 109 109 } … … 127 127 StackStats::initialize(); 128 128 wtfThreadData(); 129 s_dtoaP5Mutex = new Mutex;129 s_dtoaP5Mutex = new DeprecatedMutex; 130 130 initializeDates(); 131 131 } … … 139 139 static ThreadIdentifier identifierByPthreadHandle(const pthread_t& pthreadHandle) 140 140 { 141 MutexLocker locker(threadMapMutex());141 DeprecatedMutexLocker locker(threadMapMutex()); 142 142 143 143 ThreadMap::iterator i = threadMap().begin(); … … 153 153 { 154 154 ASSERT(!identifierByPthreadHandle(pthreadHandle)); 155 MutexLocker locker(threadMapMutex());155 DeprecatedMutexLocker locker(threadMapMutex()); 156 156 static ThreadIdentifier identifierCount = 1; 157 157 threadMap().add(identifierCount, std::make_unique<PthreadState>(pthreadHandle)); … … 220 220 221 221 { 222 MutexLocker locker(threadMapMutex());222 DeprecatedMutexLocker locker(threadMapMutex()); 223 223 pthreadHandle = pthreadHandleForIdentifierWithLockAlreadyHeld(threadID); 224 224 ASSERT(pthreadHandle); … … 243 243 { 244 244 // We don't want to lock across the call to join, since that can block our thread and cause deadlock. 245 MutexLocker locker(threadMapMutex());245 DeprecatedMutexLocker locker(threadMapMutex()); 246 246 pthreadHandle = pthreadHandleForIdentifierWithLockAlreadyHeld(threadID); 247 247 ASSERT(pthreadHandle); … … 255 255 LOG_ERROR("ThreadIdentifier %u was unable to be joined.\n", threadID); 256 256 257 MutexLocker locker(threadMapMutex());257 DeprecatedMutexLocker locker(threadMapMutex()); 258 258 PthreadState* state = threadMap().get(threadID); 259 259 ASSERT(state); … … 274 274 ASSERT(threadID); 275 275 276 MutexLocker locker(threadMapMutex());276 DeprecatedMutexLocker locker(threadMapMutex()); 277 277 pthread_t pthreadHandle = pthreadHandleForIdentifierWithLockAlreadyHeld(threadID); 278 278 ASSERT(pthreadHandle); … … 292 292 void threadDidExit(ThreadIdentifier threadID) 293 293 { 294 MutexLocker locker(threadMapMutex());294 DeprecatedMutexLocker locker(threadMapMutex()); 295 295 PthreadState* state = threadMap().get(threadID); 296 296 ASSERT(state); … … 314 314 } 315 315 316 Mutex::Mutex()316 DeprecatedMutex::DeprecatedMutex() 317 317 { 318 318 pthread_mutexattr_t attr; … … 326 326 } 327 327 328 Mutex::~Mutex()328 DeprecatedMutex::~DeprecatedMutex() 329 329 { 330 330 int result = pthread_mutex_destroy(&m_mutex); … … 332 332 } 333 333 334 void Mutex::lock()334 void DeprecatedMutex::lock() 335 335 { 336 336 int result = pthread_mutex_lock(&m_mutex); … … 338 338 } 339 339 340 bool Mutex::tryLock()340 bool DeprecatedMutex::tryLock() 341 341 { 342 342 int result = pthread_mutex_trylock(&m_mutex); … … 351 351 } 352 352 353 void Mutex::unlock()353 void DeprecatedMutex::unlock() 354 354 { 355 355 int result = pthread_mutex_unlock(&m_mutex); … … 367 367 } 368 368 369 void ThreadCondition::wait( Mutex& mutex)369 void ThreadCondition::wait(DeprecatedMutex& mutex) 370 370 { 371 371 int result = pthread_cond_wait(&m_condition, &mutex.impl()); … … 373 373 } 374 374 375 bool ThreadCondition::timedWait( Mutex& mutex, double absoluteTime)375 bool ThreadCondition::timedWait(DeprecatedMutex& mutex, double absoluteTime) 376 376 { 377 377 if (absoluteTime < currentTime()) -
trunk/Source/WTF/wtf/ThreadingWin.cpp
r183063 r187972 144 144 } 145 145 146 static Mutex& threadMapMutex()147 { 148 static Mutex mutex;146 static DeprecatedMutex& threadMapMutex() 147 { 148 static DeprecatedMutex mutex; 149 149 return mutex; 150 150 } … … 166 166 initializeRandomNumberGenerator(); 167 167 wtfThreadData(); 168 s_dtoaP5Mutex = new Mutex;168 s_dtoaP5Mutex = new DeprecatedMutex; 169 169 initializeDates(); 170 170 } … … 178 178 static void storeThreadHandleByIdentifier(DWORD threadID, HANDLE threadHandle) 179 179 { 180 MutexLocker locker(threadMapMutex());180 DeprecatedMutexLocker locker(threadMapMutex()); 181 181 ASSERT(!threadMap().contains(threadID)); 182 182 threadMap().add(threadID, threadHandle); … … 185 185 static HANDLE threadHandleForIdentifier(ThreadIdentifier id) 186 186 { 187 MutexLocker locker(threadMapMutex());187 DeprecatedMutexLocker locker(threadMapMutex()); 188 188 return threadMap().get(id); 189 189 } … … 191 191 static void clearThreadHandleForIdentifier(ThreadIdentifier id) 192 192 { 193 MutexLocker locker(threadMapMutex());193 DeprecatedMutexLocker locker(threadMapMutex()); 194 194 ASSERT(threadMap().contains(id)); 195 195 threadMap().remove(id); … … 278 278 } 279 279 280 Mutex::Mutex()280 DeprecatedMutex::DeprecatedMutex() 281 281 { 282 282 m_mutex.m_recursionCount = 0; … … 284 284 } 285 285 286 Mutex::~Mutex()286 DeprecatedMutex::~DeprecatedMutex() 287 287 { 288 288 DeleteCriticalSection(&m_mutex.m_internalMutex); 289 289 } 290 290 291 void Mutex::lock()291 void DeprecatedMutex::lock() 292 292 { 293 293 EnterCriticalSection(&m_mutex.m_internalMutex); … … 296 296 297 297 #pragma warning(suppress: 26115) 298 bool Mutex::tryLock()298 bool DeprecatedMutex::tryLock() 299 299 { 300 300 // This method is modeled after the behavior of pthread_mutex_trylock, … … 322 322 } 323 323 324 void Mutex::unlock()324 void DeprecatedMutex::unlock() 325 325 { 326 326 ASSERT(m_mutex.m_recursionCount); … … 459 459 } 460 460 461 void ThreadCondition::wait( Mutex& mutex)461 void ThreadCondition::wait(DeprecatedMutex& mutex) 462 462 { 463 463 m_condition.timedWait(mutex.impl(), INFINITE); 464 464 } 465 465 466 bool ThreadCondition::timedWait( Mutex& mutex, double absoluteTime)466 bool ThreadCondition::timedWait(DeprecatedMutex& mutex, double absoluteTime) 467 467 { 468 468 DWORD interval = absoluteTimeToWaitTimeoutInterval(absoluteTime); -
trunk/Source/WTF/wtf/WorkQueue.h
r185502 r187972 114 114 volatile LONG m_isWorkThreadRegistered; 115 115 116 Mutex m_workItemQueueLock;116 DeprecatedMutex m_workItemQueueLock; 117 117 Vector<RefPtr<WorkItemWin>> m_workItemQueue; 118 118 119 Mutex m_handlesLock;119 DeprecatedMutex m_handlesLock; 120 120 HashMap<HANDLE, RefPtr<HandleWorkItem>> m_handles; 121 121 -
trunk/Source/WTF/wtf/dtoa.cpp
r184555 r187972 55 55 namespace WTF { 56 56 57 Mutex* s_dtoaP5Mutex;57 DeprecatedMutex* s_dtoaP5Mutex; 58 58 59 59 typedef union { -
trunk/Source/WTF/wtf/dtoa.h
r165703 r187972 29 29 namespace WTF { 30 30 31 class Mutex;31 class DeprecatedMutex; 32 32 33 extern Mutex* s_dtoaP5Mutex;33 extern DeprecatedMutex* s_dtoaP5Mutex; 34 34 35 35 typedef char DtoaBuffer[80]; -
trunk/Source/WTF/wtf/efl/DispatchQueueEfl.cpp
r181271 r187972 96 96 { 97 97 { 98 MutexLocker locker(m_workItemsLock);98 DeprecatedMutexLocker locker(m_workItemsLock); 99 99 m_workItems.append(WTF::move(item)); 100 100 } … … 147 147 148 148 { 149 MutexLocker locker(m_workItemsLock);149 DeprecatedMutexLocker locker(m_workItemsLock); 150 150 if (m_workItems.isEmpty()) 151 151 return; … … 165 165 { 166 166 // Protects m_timerWorkItems. 167 MutexLocker locker(m_timerWorkItemsLock);167 DeprecatedMutexLocker locker(m_timerWorkItemsLock); 168 168 if (m_timerWorkItems.isEmpty()) 169 169 return; … … 210 210 size_t position = 0; 211 211 212 MutexLocker locker(m_timerWorkItemsLock);212 DeprecatedMutexLocker locker(m_timerWorkItemsLock); 213 213 // The items should be ordered by expire time. 214 214 for (; position < m_timerWorkItems.size(); ++position) … … 230 230 void DispatchQueue::wakeUpThread() 231 231 { 232 MutexLocker locker(m_writeToPipeDescriptorLock);232 DeprecatedMutexLocker locker(m_writeToPipeDescriptorLock); 233 233 if (write(m_writeToPipeDescriptor, &wakeUpThreadMessage, sizeof(char)) == -1) 234 234 LOG_ERROR("Failed to wake up DispatchQueue Thread"); … … 237 237 timeval* DispatchQueue::getNextTimeOut() const 238 238 { 239 MutexLocker locker(m_timerWorkItemsLock);239 DeprecatedMutexLocker locker(m_timerWorkItemsLock); 240 240 if (m_timerWorkItems.isEmpty()) 241 241 return 0; -
trunk/Source/WTF/wtf/efl/DispatchQueueEfl.h
r183746 r187972 64 64 int m_readFromPipeDescriptor; 65 65 int m_writeToPipeDescriptor; 66 Mutex m_writeToPipeDescriptorLock;66 DeprecatedMutex m_writeToPipeDescriptorLock; 67 67 68 68 bool m_isThreadRunning; … … 72 72 73 73 Vector<std::unique_ptr<WorkItem>> m_workItems; 74 Mutex m_workItemsLock;74 DeprecatedMutex m_workItemsLock; 75 75 76 76 Vector<std::unique_ptr<TimerWorkItem>> m_timerWorkItems; 77 mutable Mutex m_timerWorkItemsLock;77 mutable DeprecatedMutex m_timerWorkItemsLock; 78 78 }; 79 79 -
trunk/Source/WTF/wtf/efl/RunLoopEfl.cpp
r183063 r187972 60 60 61 61 { 62 MutexLocker locker(loop->m_wakeUpEventRequestedLock);62 DeprecatedMutexLocker locker(loop->m_wakeUpEventRequestedLock); 63 63 loop->m_wakeUpEventRequested = false; 64 64 } … … 70 70 { 71 71 { 72 MutexLocker locker(m_wakeUpEventRequestedLock);72 DeprecatedMutexLocker locker(m_wakeUpEventRequestedLock); 73 73 if (m_wakeUpEventRequested) 74 74 return; … … 77 77 78 78 { 79 MutexLocker locker(m_pipeLock);79 DeprecatedMutexLocker locker(m_pipeLock); 80 80 ecore_pipe_write(m_pipe.get(), wakupEcorePipeMessage, ecorePipeMessageSize); 81 81 } -
trunk/Source/WTF/wtf/threads/BinarySemaphore.cpp
r185849 r187972 40 40 void BinarySemaphore::signal() 41 41 { 42 MutexLocker locker(m_mutex);42 DeprecatedMutexLocker locker(m_mutex); 43 43 44 44 m_isSet = true; … … 48 48 bool BinarySemaphore::wait(double absoluteTime) 49 49 { 50 MutexLocker locker(m_mutex);50 DeprecatedMutexLocker locker(m_mutex); 51 51 52 52 bool timedOut = false; -
trunk/Source/WTF/wtf/threads/BinarySemaphore.h
r185847 r187972 45 45 bool m_isSet; 46 46 47 Mutex m_mutex;47 DeprecatedMutex m_mutex; 48 48 ThreadCondition m_condition; 49 49 }; -
trunk/Source/WTF/wtf/win/WorkQueueWin.cpp
r181257 r187972 42 42 43 43 { 44 MutexLocker lock(queue->m_workItemQueueLock);44 DeprecatedMutexLocker lock(queue->m_workItemQueueLock); 45 45 queue->m_workItemQueue.append(item); 46 46 … … 121 121 { 122 122 #if !ASSERT_DISABLED 123 MutexLocker lock(m_handlesLock);123 DeprecatedMutexLocker lock(m_handlesLock); 124 124 ASSERT(m_handles.isEmpty()); 125 125 #endif … … 132 132 void WorkQueue::dispatch(std::function<void()> function) 133 133 { 134 MutexLocker locker(m_workItemQueueLock);134 DeprecatedMutexLocker locker(m_workItemQueueLock); 135 135 ref(); 136 136 m_workItemQueue.append(WorkItemWin::create(function, this)); … … 151 151 WorkQueue* queue; 152 152 std::function<void()> function; 153 Mutex timerMutex;153 DeprecatedMutex timerMutex; 154 154 HANDLE timer; 155 155 … … 172 172 timerContext->queue->dispatch(timerContext->function); 173 173 174 MutexLocker lock(timerContext->timerMutex);174 DeprecatedMutexLocker lock(timerContext->timerMutex); 175 175 ASSERT(timerContext->timer); 176 176 ASSERT(timerContext->queue->m_timerQueue); … … 194 194 // context->timer with a mutex to ensure the timer callback doesn't access it before the 195 195 // timer handle has been stored in it. 196 MutexLocker lock(context->timerMutex);196 DeprecatedMutexLocker lock(context->timerMutex); 197 197 198 198 // Since our timer callback is quick, we can execute in the timer thread itself and avoid -
trunk/Source/WebCore/ChangeLog
r187971 r187972 1 2015-08-04 Filip Pizlo <[email protected]> 2 3 Rename Mutex to DeprecatedMutex 4 https://bugs.webkit.org/show_bug.cgi?id=147675 5 6 Reviewed by Geoffrey Garen. 7 8 No new tests because this is just a renaming. 9 10 * Modules/webaudio/AsyncAudioDecoder.cpp: 11 (WebCore::AsyncAudioDecoder::AsyncAudioDecoder): 12 (WebCore::AsyncAudioDecoder::runLoop): 13 * Modules/webaudio/AsyncAudioDecoder.h: 14 * Modules/webaudio/AudioContext.h: 15 * Modules/webaudio/MediaStreamAudioSource.cpp: 16 (WebCore::MediaStreamAudioSource::addAudioConsumer): 17 (WebCore::MediaStreamAudioSource::removeAudioConsumer): 18 (WebCore::MediaStreamAudioSource::setAudioFormat): 19 (WebCore::MediaStreamAudioSource::consumeAudio): 20 * Modules/webaudio/MediaStreamAudioSource.h: 21 * Modules/webdatabase/Database.cpp: 22 (WebCore::Database::close): 23 (WebCore::Database::runTransaction): 24 (WebCore::Database::inProgressTransactionCompleted): 25 (WebCore::Database::hasPendingTransaction): 26 * Modules/webdatabase/DatabaseBackend.h: 27 * Modules/webdatabase/DatabaseBackendBase.cpp: 28 (WebCore::DatabaseBackendBase::performOpenAndVerify): 29 (WebCore::DatabaseBackendBase::isInterrupted): 30 * Modules/webdatabase/DatabaseContext.cpp: 31 (WebCore::DatabaseContext::databaseThread): 32 (WebCore::DatabaseContext::setPaused): 33 * Modules/webdatabase/DatabaseContext.h: 34 * Modules/webdatabase/DatabaseTask.h: 35 * Modules/webdatabase/DatabaseThread.cpp: 36 (WebCore::DatabaseThread::start): 37 (WebCore::DatabaseThread::setPaused): 38 (WebCore::DatabaseThread::handlePausedQueue): 39 (WebCore::DatabaseThread::databaseThread): 40 * Modules/webdatabase/DatabaseThread.h: 41 * Modules/webdatabase/DatabaseTracker.cpp: 42 (WebCore::DatabaseTracker::setDatabaseDirectoryPath): 43 (WebCore::DatabaseTracker::canEstablishDatabase): 44 (WebCore::DatabaseTracker::retryCanEstablishDatabase): 45 (WebCore::DatabaseTracker::hasEntryForOrigin): 46 (WebCore::DatabaseTracker::getMaxSizeForDatabase): 47 (WebCore::DatabaseTracker::closeAllDatabases): 48 (WebCore::DatabaseTracker::interruptAllDatabasesForContext): 49 (WebCore::DatabaseTracker::fullPathForDatabase): 50 (WebCore::DatabaseTracker::origins): 51 (WebCore::DatabaseTracker::databaseNamesForOrigin): 52 (WebCore::DatabaseTracker::detailsForNameAndOrigin): 53 (WebCore::DatabaseTracker::setDatabaseDetails): 54 (WebCore::DatabaseTracker::doneCreatingDatabase): 55 (WebCore::DatabaseTracker::addOpenDatabase): 56 (WebCore::DatabaseTracker::removeOpenDatabase): 57 (WebCore::DatabaseTracker::getOpenDatabases): 58 (WebCore::DatabaseTracker::originLockFor): 59 (WebCore::DatabaseTracker::quotaForOrigin): 60 (WebCore::DatabaseTracker::setQuota): 61 (WebCore::DatabaseTracker::deleteOrigin): 62 (WebCore::DatabaseTracker::deleteDatabase): 63 (WebCore::DatabaseTracker::deleteDatabaseFile): 64 (WebCore::DatabaseTracker::removeDeletedOpenedDatabases): 65 (WebCore::DatabaseTracker::deleteDatabaseFileIfEmpty): 66 (WebCore::DatabaseTracker::openDatabaseMutex): 67 (WebCore::DatabaseTracker::setDatabasesPaused): 68 (WebCore::DatabaseTracker::setClient): 69 (WebCore::notificationMutex): 70 (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged): 71 (WebCore::DatabaseTracker::notifyDatabasesChanged): 72 * Modules/webdatabase/DatabaseTracker.h: 73 * Modules/webdatabase/OriginLock.h: 74 * Modules/webdatabase/SQLCallbackWrapper.h: 75 (WebCore::SQLCallbackWrapper::clear): 76 (WebCore::SQLCallbackWrapper::unwrap): 77 (WebCore::SQLCallbackWrapper::hasCallback): 78 * Modules/webdatabase/SQLTransactionBackend.cpp: 79 (WebCore::SQLTransactionBackend::doCleanup): 80 (WebCore::SQLTransactionBackend::enqueueStatementBackend): 81 (WebCore::SQLTransactionBackend::getNextStatement): 82 * Modules/webdatabase/SQLTransactionBackend.h: 83 * bindings/js/WorkerScriptController.cpp: 84 (WebCore::WorkerScriptController::scheduleExecutionTermination): 85 (WebCore::WorkerScriptController::isExecutionTerminating): 86 * bindings/js/WorkerScriptController.h: 87 * dom/default/PlatformMessagePortChannel.cpp: 88 (WebCore::MessagePortChannel::postMessageToRemote): 89 (WebCore::MessagePortChannel::tryGetMessageFromRemote): 90 (WebCore::MessagePortChannel::isConnectedTo): 91 (WebCore::MessagePortChannel::hasPendingActivity): 92 (WebCore::MessagePortChannel::locallyEntangledPort): 93 (WebCore::PlatformMessagePortChannel::setRemotePort): 94 (WebCore::PlatformMessagePortChannel::entangledChannel): 95 (WebCore::PlatformMessagePortChannel::closeInternal): 96 * dom/default/PlatformMessagePortChannel.h: 97 * loader/icon/IconDatabase.cpp: 98 (WebCore::IconDatabase::removeAllIcons): 99 (WebCore::IconDatabase::synchronousIconForPageURL): 100 (WebCore::IconDatabase::synchronousNativeIconForPageURL): 101 (WebCore::IconDatabase::synchronousIconURLForPageURL): 102 (WebCore::IconDatabase::retainIconForPageURL): 103 (WebCore::IconDatabase::performRetainIconForPageURL): 104 (WebCore::IconDatabase::releaseIconForPageURL): 105 (WebCore::IconDatabase::performReleaseIconForPageURL): 106 (WebCore::IconDatabase::setIconDataForIconURL): 107 (WebCore::IconDatabase::setIconURLForPageURL): 108 (WebCore::IconDatabase::synchronousLoadDecisionForIconURL): 109 (WebCore::IconDatabase::synchronousIconDataKnownForIconURL): 110 (WebCore::IconDatabase::pageURLMappingCount): 111 (WebCore::IconDatabase::retainedPageURLCount): 112 (WebCore::IconDatabase::iconRecordCount): 113 (WebCore::IconDatabase::iconRecordCountWithData): 114 (WebCore::IconDatabase::wakeSyncThread): 115 (WebCore::IconDatabase::isOpenBesidesMainThreadCallbacks): 116 (WebCore::IconDatabase::databasePath): 117 (WebCore::IconDatabase::getOrCreatePageURLRecord): 118 (WebCore::IconDatabase::iconDatabaseSyncThread): 119 (WebCore::IconDatabase::performOpenInitialization): 120 (WebCore::IconDatabase::performURLImport): 121 (WebCore::IconDatabase::syncThreadMainLoop): 122 (WebCore::IconDatabase::performPendingRetainAndReleaseOperations): 123 (WebCore::IconDatabase::readFromDatabase): 124 (WebCore::IconDatabase::writeToDatabase): 125 (WebCore::IconDatabase::pruneUnretainedIcons): 126 (WebCore::IconDatabase::cleanupSyncThread): 127 * loader/icon/IconDatabase.h: 128 * page/scrolling/ScrollingTree.cpp: 129 (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously): 130 (WebCore::ScrollingTree::commitNewTreeState): 131 (WebCore::ScrollingTree::setMainFramePinState): 132 (WebCore::ScrollingTree::mainFrameScrollPosition): 133 (WebCore::ScrollingTree::setMainFrameScrollPosition): 134 (WebCore::ScrollingTree::isPointInNonFastScrollableRegion): 135 (WebCore::ScrollingTree::isRubberBandInProgress): 136 (WebCore::ScrollingTree::setMainFrameIsRubberBanding): 137 (WebCore::ScrollingTree::isScrollSnapInProgress): 138 (WebCore::ScrollingTree::setMainFrameIsScrollSnapping): 139 (WebCore::ScrollingTree::setCanRubberBandState): 140 (WebCore::ScrollingTree::rubberBandsAtLeft): 141 (WebCore::ScrollingTree::rubberBandsAtRight): 142 (WebCore::ScrollingTree::rubberBandsAtBottom): 143 (WebCore::ScrollingTree::rubberBandsAtTop): 144 (WebCore::ScrollingTree::setScrollPinningBehavior): 145 (WebCore::ScrollingTree::scrollPinningBehavior): 146 (WebCore::ScrollingTree::willWheelEventStartSwipeGesture): 147 (WebCore::ScrollingTree::latchedNode): 148 (WebCore::ScrollingTree::setLatchedNode): 149 (WebCore::ScrollingTree::clearLatchedNode): 150 * page/scrolling/ScrollingTree.h: 151 * platform/MemoryPressureHandler.h: 152 * platform/audio/HRTFDatabaseLoader.cpp: 153 (WebCore::HRTFDatabaseLoader::loadAsynchronously): 154 (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion): 155 * platform/audio/HRTFDatabaseLoader.h: 156 * platform/cocoa/MemoryPressureHandlerCocoa.mm: 157 (WebCore::MemoryPressureHandler::setReceivedMemoryPressure): 158 (WebCore::MemoryPressureHandler::clearMemoryPressure): 159 (WebCore::MemoryPressureHandler::shouldWaitForMemoryClearMessage): 160 (WebCore::MemoryPressureHandler::respondToMemoryPressureIfNeeded): 161 * platform/graphics/DisplayRefreshMonitor.cpp: 162 (WebCore::DisplayRefreshMonitor::displayDidRefresh): 163 * platform/graphics/DisplayRefreshMonitor.h: 164 (WebCore::DisplayRefreshMonitor::setMonotonicAnimationStartTime): 165 (WebCore::DisplayRefreshMonitor::mutex): 166 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: 167 (WebCore::MediaPlayerPrivateAVFoundation::setDelayCallbacks): 168 (WebCore::MediaPlayerPrivateAVFoundation::clearMainThreadPendingFlag): 169 (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): 170 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: 171 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: 172 (WebCore::AVFWrapper::callbackContext): 173 (WebCore::AVFWrapper::~AVFWrapper): 174 (WebCore::AVFWrapper::mapLock): 175 (WebCore::AVFWrapper::addToMap): 176 (WebCore::AVFWrapper::removeFromMap): 177 (WebCore::AVFWrapper::periodicTimeObserverCallback): 178 (WebCore::AVFWrapper::processNotification): 179 (WebCore::AVFWrapper::loadPlayableCompletionCallback): 180 (WebCore::AVFWrapper::loadMetadataCompletionCallback): 181 (WebCore::AVFWrapper::seekCompletedCallback): 182 (WebCore::AVFWrapper::processCue): 183 (WebCore::AVFWrapper::legibleOutputCallback): 184 (WebCore::AVFWrapper::processShouldWaitForLoadingOfResource): 185 (WebCore::AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource): 186 * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: 187 (WebCore::InbandTextTrackPrivateGStreamer::handleSample): 188 (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample): 189 * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h: 190 * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp: 191 (WebCore::TrackPrivateBaseGStreamer::tagsChanged): 192 (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): 193 * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: 194 * platform/graphics/mac/DisplayRefreshMonitorMac.cpp: 195 (WebCore::DisplayRefreshMonitorMac::requestRefreshCallback): 196 (WebCore::DisplayRefreshMonitorMac::displayLinkFired): 197 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: 198 (WebCore::MediaPlayerPrivateMediaFoundation::addListener): 199 (WebCore::MediaPlayerPrivateMediaFoundation::removeListener): 200 (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted): 201 (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke): 202 (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted): 203 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h: 204 * platform/ios/LegacyTileCache.h: 205 * platform/ios/LegacyTileCache.mm: 206 (WebCore::LegacyTileCache::setTilesOpaque): 207 (WebCore::LegacyTileCache::doLayoutTiles): 208 (WebCore::LegacyTileCache::setCurrentScale): 209 (WebCore::LegacyTileCache::commitScaleChange): 210 (WebCore::LegacyTileCache::layoutTilesNow): 211 (WebCore::LegacyTileCache::layoutTilesNowForRect): 212 (WebCore::LegacyTileCache::removeAllNonVisibleTiles): 213 (WebCore::LegacyTileCache::removeAllTiles): 214 (WebCore::LegacyTileCache::removeForegroundTiles): 215 (WebCore::LegacyTileCache::setContentReplacementImage): 216 (WebCore::LegacyTileCache::contentReplacementImage): 217 (WebCore::LegacyTileCache::tileCreationTimerFired): 218 (WebCore::LegacyTileCache::setNeedsDisplayInRect): 219 (WebCore::LegacyTileCache::updateTilingMode): 220 (WebCore::LegacyTileCache::setTilingMode): 221 (WebCore::LegacyTileCache::doPendingRepaints): 222 (WebCore::LegacyTileCache::flushSavedDisplayRects): 223 (WebCore::LegacyTileCache::prepareToDraw): 224 * platform/ios/LegacyTileLayerPool.h: 225 * platform/ios/LegacyTileLayerPool.mm: 226 (WebCore::LegacyTileLayerPool::addLayer): 227 (WebCore::LegacyTileLayerPool::takeLayerWithSize): 228 (WebCore::LegacyTileLayerPool::setCapacity): 229 (WebCore::LegacyTileLayerPool::prune): 230 (WebCore::LegacyTileLayerPool::drain): 231 * platform/network/curl/CurlDownload.cpp: 232 (WebCore::CurlDownloadManager::add): 233 (WebCore::CurlDownloadManager::remove): 234 (WebCore::CurlDownloadManager::getActiveDownloadCount): 235 (WebCore::CurlDownloadManager::getPendingDownloadCount): 236 (WebCore::CurlDownloadManager::stopThreadIfIdle): 237 (WebCore::CurlDownloadManager::updateHandleList): 238 (WebCore::CurlDownload::~CurlDownload): 239 (WebCore::CurlDownload::init): 240 (WebCore::CurlDownload::getTempPath): 241 (WebCore::CurlDownload::getUrl): 242 (WebCore::CurlDownload::getResponse): 243 (WebCore::CurlDownload::closeFile): 244 (WebCore::CurlDownload::didReceiveHeader): 245 (WebCore::CurlDownload::didReceiveData): 246 (WebCore::CurlDownload::didFail): 247 * platform/network/curl/CurlDownload.h: 248 * platform/network/curl/ResourceHandleManager.cpp: 249 (WebCore::cookieJarPath): 250 (WebCore::sharedResourceMutex): 251 (WebCore::curl_lock_callback): 252 (WebCore::curl_unlock_callback): 253 * platform/network/ios/QuickLook.mm: 254 (WebCore::QLDirectoryAttributes): 255 (qlPreviewConverterDictionaryMutex): 256 (WebCore::addQLPreviewConverterWithFileForURL): 257 (WebCore::qlPreviewConverterUTIForURL): 258 (WebCore::removeQLPreviewConverterForURL): 259 (WebCore::safeQLURLForDocumentURLAndResourceURL): 260 * platform/sql/SQLiteDatabase.cpp: 261 (WebCore::SQLiteDatabase::close): 262 (WebCore::SQLiteDatabase::interrupt): 263 (WebCore::SQLiteDatabase::maximumSize): 264 (WebCore::SQLiteDatabase::setMaximumSize): 265 (WebCore::SQLiteDatabase::pageSize): 266 (WebCore::SQLiteDatabase::freeSpaceSize): 267 (WebCore::SQLiteDatabase::totalSize): 268 (WebCore::SQLiteDatabase::runIncrementalVacuumCommand): 269 (WebCore::SQLiteDatabase::setAuthorizer): 270 * platform/sql/SQLiteDatabase.h: 271 (WebCore::SQLiteDatabase::databaseMutex): 272 * platform/sql/SQLiteStatement.cpp: 273 (WebCore::SQLiteStatement::prepare): 274 (WebCore::SQLiteStatement::step): 275 * workers/WorkerThread.cpp: 276 (WebCore::WorkerThread::start): 277 (WebCore::WorkerThread::workerThread): 278 (WebCore::WorkerThread::stop): 279 * workers/WorkerThread.h: 280 1 281 2015-08-05 Matthew Daiter <[email protected]> 2 282 -
trunk/Source/WebCore/Modules/webaudio/AsyncAudioDecoder.cpp
r180598 r187972 39 39 { 40 40 // Start worker thread. 41 MutexLocker lock(m_threadCreationMutex);41 DeprecatedMutexLocker lock(m_threadCreationMutex); 42 42 m_threadID = createThread(AsyncAudioDecoder::threadEntry, this, "Audio Decoder"); 43 43 } … … 77 77 { 78 78 // Wait for until we have m_threadID established before starting the run loop. 79 MutexLocker lock(m_threadCreationMutex);79 DeprecatedMutexLocker lock(m_threadCreationMutex); 80 80 } 81 81 -
trunk/Source/WebCore/Modules/webaudio/AsyncAudioDecoder.h
r180598 r187972 82 82 83 83 WTF::ThreadIdentifier m_threadID; 84 Mutex m_threadCreationMutex;84 DeprecatedMutex m_threadCreationMutex; 85 85 MessageQueue<DecodingTask> m_queue; 86 86 }; -
trunk/Source/WebCore/Modules/webaudio/AudioContext.h
r186396 r187972 381 381 382 382 // Graph locking. 383 Mutex m_contextGraphMutex;383 DeprecatedMutex m_contextGraphMutex; 384 384 volatile ThreadIdentifier m_audioThread { 0 }; 385 385 volatile ThreadIdentifier m_graphOwnerThread; // if the lock is held then this is the thread which owns it, otherwise == UndefinedThreadIdentifier -
trunk/Source/WebCore/Modules/webaudio/MediaStreamAudioSource.cpp
r185316 r187972 64 64 void MediaStreamAudioSource::addAudioConsumer(PassRefPtr<AudioDestinationConsumer> consumer) 65 65 { 66 MutexLocker locker(m_audioConsumersLock);66 DeprecatedMutexLocker locker(m_audioConsumersLock); 67 67 m_audioConsumers.append(consumer); 68 68 } … … 70 70 bool MediaStreamAudioSource::removeAudioConsumer(AudioDestinationConsumer* consumer) 71 71 { 72 MutexLocker locker(m_audioConsumersLock);72 DeprecatedMutexLocker locker(m_audioConsumersLock); 73 73 size_t pos = m_audioConsumers.find(consumer); 74 74 if (pos != notFound) { … … 81 81 void MediaStreamAudioSource::setAudioFormat(size_t numberOfChannels, float sampleRate) 82 82 { 83 MutexLocker locker(m_audioConsumersLock);83 DeprecatedMutexLocker locker(m_audioConsumersLock); 84 84 for (auto& consumer : m_audioConsumers) 85 85 consumer->setFormat(numberOfChannels, sampleRate); … … 88 88 void MediaStreamAudioSource::consumeAudio(AudioBus* bus, size_t numberOfFrames) 89 89 { 90 MutexLocker locker(m_audioConsumersLock);90 DeprecatedMutexLocker locker(m_audioConsumersLock); 91 91 for (auto& consumer : m_audioConsumers) 92 92 consumer->consumeAudio(bus, numberOfFrames); -
trunk/Source/WebCore/Modules/webaudio/MediaStreamAudioSource.h
r184940 r187972 66 66 67 67 String m_deviceId; 68 Mutex m_audioConsumersLock;68 DeprecatedMutex m_audioConsumersLock; 69 69 Vector<RefPtr<AudioDestinationConsumer>> m_audioConsumers; 70 70 RealtimeMediaSourceStates m_currentStates; -
trunk/Source/WebCore/Modules/webdatabase/Database.cpp
r187931 r187972 116 116 117 117 { 118 MutexLocker locker(m_transactionInProgressMutex);118 DeprecatedMutexLocker locker(m_transactionInProgressMutex); 119 119 120 120 // Clean up transactions that have not been scheduled yet: … … 175 175 PassRefPtr<SQLTransactionBackend> Database::runTransaction(PassRefPtr<SQLTransaction> transaction, bool readOnly, const ChangeVersionData* data) 176 176 { 177 MutexLocker locker(m_transactionInProgressMutex);177 DeprecatedMutexLocker locker(m_transactionInProgressMutex); 178 178 if (!m_isTransactionQueueEnabled) 179 179 return 0; … … 203 203 void Database::inProgressTransactionCompleted() 204 204 { 205 MutexLocker locker(m_transactionInProgressMutex);205 DeprecatedMutexLocker locker(m_transactionInProgressMutex); 206 206 m_transactionInProgress = false; 207 207 scheduleTransaction(); … … 210 210 bool Database::hasPendingTransaction() 211 211 { 212 MutexLocker locker(m_transactionInProgressMutex);212 DeprecatedMutexLocker locker(m_transactionInProgressMutex); 213 213 return m_transactionInProgress || !m_transactionQueue.isEmpty(); 214 214 } -
trunk/Source/WebCore/Modules/webdatabase/DatabaseBackend.h
r178575 r187972 58 58 59 59 Deque<RefPtr<SQLTransactionBackend>> m_transactionQueue; 60 Mutex m_transactionInProgressMutex;60 DeprecatedMutex m_transactionInProgressMutex; 61 61 bool m_transactionInProgress; 62 62 bool m_isTransactionQueueEnabled; -
trunk/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp
r183663 r187972 323 323 { 324 324 // Make sure we wait till the background removal of the empty database files finished before trying to open any database. 325 MutexLocker locker(DatabaseTracker::openDatabaseMutex());325 DeprecatedMutexLocker locker(DatabaseTracker::openDatabaseMutex()); 326 326 } 327 327 #endif … … 594 594 bool DatabaseBackendBase::isInterrupted() 595 595 { 596 MutexLocker locker(m_sqliteDatabase.databaseMutex());596 DeprecatedMutexLocker locker(m_sqliteDatabase.databaseMutex()); 597 597 return m_sqliteDatabase.isInterrupted(); 598 598 } -
trunk/Source/WebCore/Modules/webdatabase/DatabaseTask.h
r187931 r187972 60 60 private: 61 61 bool m_taskCompleted; 62 Mutex m_synchronousMutex;62 DeprecatedMutex m_synchronousMutex; 63 63 ThreadCondition m_synchronousCondition; 64 64 #ifndef NDEBUG -
trunk/Source/WebCore/Modules/webdatabase/DatabaseThread.cpp
r187931 r187972 62 62 bool DatabaseThread::start() 63 63 { 64 MutexLocker lock(m_threadCreationMutex);64 DeprecatedMutexLocker lock(m_threadCreationMutex); 65 65 66 66 if (m_threadID) … … 101 101 { 102 102 // Wait for DatabaseThread::start() to complete. 103 MutexLocker lock(m_threadCreationMutex);103 DeprecatedMutexLocker lock(m_threadCreationMutex); 104 104 LOG(StorageAPI, "Started DatabaseThread %p", this); 105 105 } -
trunk/Source/WebCore/Modules/webdatabase/DatabaseThread.h
r187926 r187972 73 73 void databaseThread(); 74 74 75 Mutex m_threadCreationMutex;75 DeprecatedMutex m_threadCreationMutex; 76 76 ThreadIdentifier m_threadID; 77 77 RefPtr<DatabaseThread> m_selfRef; -
trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp
r187927 r187972 90 90 void DatabaseTracker::setDatabaseDirectoryPath(const String& path) 91 91 { 92 MutexLocker lockDatabase(m_databaseGuard);92 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 93 93 ASSERT(!m_database.isOpen()); 94 94 m_databaseDirectoryPath = path.isolatedCopy(); … … 167 167 error = DatabaseError::None; 168 168 169 MutexLocker lockDatabase(m_databaseGuard);169 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 170 170 SecurityOrigin* origin = context->securityOrigin(); 171 171 … … 219 219 error = DatabaseError::None; 220 220 221 MutexLocker lockDatabase(m_databaseGuard);221 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 222 222 SecurityOrigin* origin = context->securityOrigin(); 223 223 … … 258 258 bool DatabaseTracker::hasEntryForOrigin(SecurityOrigin* origin) 259 259 { 260 MutexLocker lockDatabase(m_databaseGuard);260 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 261 261 return hasEntryForOriginNoLock(origin); 262 262 } … … 287 287 // The maximum size for a database is the full quota for its origin, minus the current usage within the origin, 288 288 // plus the current usage of the given database 289 MutexLocker lockDatabase(m_databaseGuard);289 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 290 290 SecurityOrigin* origin = database->securityOrigin(); 291 291 … … 312 312 Vector<Ref<Database>> openDatabases; 313 313 { 314 MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);314 DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard); 315 315 if (!m_openDatabaseMap) 316 316 return; … … 390 390 String DatabaseTracker::fullPathForDatabase(SecurityOrigin* origin, const String& name, bool createIfNotExists) 391 391 { 392 MutexLocker lockDatabase(m_databaseGuard);392 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 393 393 return fullPathForDatabaseNoLock(origin, name, createIfNotExists).isolatedCopy(); 394 394 } … … 396 396 void DatabaseTracker::origins(Vector<RefPtr<SecurityOrigin>>& originsResult) 397 397 { 398 MutexLocker lockDatabase(m_databaseGuard);398 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 399 399 400 400 openTrackerDatabase(DontCreateIfDoesNotExist); … … 449 449 Vector<String> temp; 450 450 { 451 MutexLocker lockDatabase(m_databaseGuard);451 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 452 452 if (!databaseNamesForOriginNoLock(origin, temp)) 453 453 return false; … … 466 466 467 467 { 468 MutexLocker lockDatabase(m_databaseGuard);468 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 469 469 470 470 openTrackerDatabase(DontCreateIfDoesNotExist); … … 501 501 int64_t guid = 0; 502 502 503 MutexLocker lockDatabase(m_databaseGuard);503 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 504 504 505 505 openTrackerDatabase(CreateIfDoesNotExist); … … 550 550 void DatabaseTracker::doneCreatingDatabase(Database* database) 551 551 { 552 MutexLocker lockDatabase(m_databaseGuard);552 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 553 553 doneCreatingDatabase(database->securityOrigin(), database->stringIdentifier()); 554 554 } … … 560 560 561 561 { 562 MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);562 DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard); 563 563 564 564 if (!m_openDatabaseMap) … … 590 590 591 591 { 592 MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);592 DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard); 593 593 594 594 if (!m_openDatabaseMap) { … … 630 630 void DatabaseTracker::getOpenDatabases(SecurityOrigin* origin, const String& name, HashSet<RefPtr<Database>>* databases) 631 631 { 632 MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);632 DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard); 633 633 if (!m_openDatabaseMap) 634 634 return; … … 648 648 RefPtr<OriginLock> DatabaseTracker::originLockFor(SecurityOrigin* origin) 649 649 { 650 MutexLocker lockDatabase(m_databaseGuard);650 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 651 651 String databaseIdentifier = origin->databaseIdentifier(); 652 652 … … 728 728 unsigned long long DatabaseTracker::quotaForOrigin(SecurityOrigin* origin) 729 729 { 730 MutexLocker lockDatabase(m_databaseGuard);730 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 731 731 return quotaForOriginNoLock(origin); 732 732 } … … 734 734 void DatabaseTracker::setQuota(SecurityOrigin* origin, unsigned long long quota) 735 735 { 736 MutexLocker lockDatabase(m_databaseGuard);736 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 737 737 738 738 if (quotaForOriginNoLock(origin) == quota) … … 865 865 Vector<String> databaseNames; 866 866 { 867 MutexLocker lockDatabase(m_databaseGuard);867 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 868 868 openTrackerDatabase(DontCreateIfDoesNotExist); 869 869 if (!m_database.isOpen()) … … 891 891 892 892 { 893 MutexLocker lockDatabase(m_databaseGuard);893 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 894 894 deleteOriginLockFor(origin); 895 895 doneDeletingOrigin(origin); … … 1072 1072 { 1073 1073 { 1074 MutexLocker lockDatabase(m_databaseGuard);1074 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 1075 1075 openTrackerDatabase(DontCreateIfDoesNotExist); 1076 1076 if (!m_database.isOpen()) … … 1087 1087 if (!deleteDatabaseFile(origin, name)) { 1088 1088 LOG_ERROR("Unable to delete file for database %s in origin %s", name.ascii().data(), origin->databaseIdentifier().ascii().data()); 1089 MutexLocker lockDatabase(m_databaseGuard);1089 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 1090 1090 doneDeletingDatabase(origin, name); 1091 1091 return false; 1092 1092 } 1093 1093 1094 MutexLocker lockDatabase(m_databaseGuard);1094 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 1095 1095 1096 1096 SQLiteStatement statement(m_database, "DELETE FROM Databases WHERE origin=? AND name=?"); … … 1132 1132 #ifndef NDEBUG 1133 1133 { 1134 MutexLocker lockDatabase(m_databaseGuard);1134 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 1135 1135 ASSERT(isDeletingDatabaseOrOriginFor(origin, name)); 1136 1136 } … … 1143 1143 // during the synchronous DatabaseThread call it triggers. 1144 1144 { 1145 MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);1145 DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard); 1146 1146 if (m_openDatabaseMap) { 1147 1147 // There are some open databases, lets check if they are for this origin. … … 1186 1186 { 1187 1187 // Acquire the lock before calling openTrackerDatabase. 1188 MutexLocker lockDatabase(m_databaseGuard);1188 DeprecatedMutexLocker lockDatabase(m_databaseGuard); 1189 1189 openTrackerDatabase(DontCreateIfDoesNotExist); 1190 1190 } … … 1202 1202 // during the synchronous DatabaseThread call it triggers. 1203 1203 { 1204 MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);1204 DeprecatedMutexLocker openDatabaseMapLock(m_openDatabaseMapGuard); 1205 1205 if (m_openDatabaseMap) { 1206 1206 for (auto& openDatabase : *m_openDatabaseMap) { … … 1306 1306 } 1307 1307 1308 Mutex& DatabaseTracker::openDatabaseMutex()1309 { 1310 static NeverDestroyed< Mutex> mutex;1308 DeprecatedMutex& DatabaseTracker::openDatabaseMutex() 1309 { 1310 static NeverDestroyed<DeprecatedMutex> mutex; 1311 1311 return mutex; 1312 1312 } … … 1331 1331 } 1332 1332 1333 static Mutex& notificationMutex()1334 { 1335 static NeverDestroyed< Mutex> mutex;1333 static DeprecatedMutex& notificationMutex() 1334 { 1335 static NeverDestroyed<DeprecatedMutex> mutex; 1336 1336 return mutex; 1337 1337 } … … 1347 1347 void DatabaseTracker::scheduleNotifyDatabaseChanged(SecurityOrigin* origin, const String& name) 1348 1348 { 1349 MutexLocker locker(notificationMutex());1349 DeprecatedMutexLocker locker(notificationMutex()); 1350 1350 1351 1351 notificationQueue().append(std::pair<RefPtr<SecurityOrigin>, String>(origin->isolatedCopy(), name.isolatedCopy())); … … 1373 1373 NotificationQueue notifications; 1374 1374 { 1375 MutexLocker locker(notificationMutex());1375 DeprecatedMutexLocker locker(notificationMutex()); 1376 1376 1377 1377 notifications.swap(notificationQueue()); -
trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.h
r187927 r187972 108 108 // clean up zero byte database files. Any operations to open new database will have to 109 109 // wait for that task to finish by waiting on this mutex. 110 static Mutex& openDatabaseMutex();110 static DeprecatedMutex& openDatabaseMutex(); 111 111 112 112 WEBCORE_EXPORT static void emptyDatabaseFilesRemovalTaskWillBeScheduled(); … … 151 151 typedef HashMap<RefPtr<SecurityOrigin>, DatabaseNameMap*> DatabaseOriginMap; 152 152 153 Mutex m_openDatabaseMapGuard;153 DeprecatedMutex m_openDatabaseMapGuard; 154 154 mutable std::unique_ptr<DatabaseOriginMap> m_openDatabaseMap; 155 155 156 156 // This lock protects m_database, m_originLockMap, m_databaseDirectoryPath, m_originsBeingDeleted, m_beingCreated, and m_beingDeleted. 157 Mutex m_databaseGuard;157 DeprecatedMutex m_databaseGuard; 158 158 SQLiteDatabase m_database; 159 159 -
trunk/Source/WebCore/Modules/webdatabase/OriginLock.h
r181837 r187972 49 49 50 50 String m_lockFileName; 51 Mutex m_mutex;51 DeprecatedMutex m_mutex; 52 52 #if USE(FILE_LOCK) 53 53 PlatformFileHandle m_lockHandle; -
trunk/Source/WebCore/Modules/webdatabase/SQLCallbackWrapper.h
r185336 r187972 59 59 T* callback; 60 60 { 61 MutexLocker locker(m_mutex);61 DeprecatedMutexLocker locker(m_mutex); 62 62 if (!m_callback) { 63 63 ASSERT(!m_scriptExecutionContext); … … 84 84 PassRefPtr<T> unwrap() 85 85 { 86 MutexLocker locker(m_mutex);86 DeprecatedMutexLocker locker(m_mutex); 87 87 ASSERT(!m_callback || m_scriptExecutionContext->isContextThread()); 88 88 m_scriptExecutionContext = nullptr; … … 94 94 95 95 private: 96 Mutex m_mutex;96 DeprecatedMutex m_mutex; 97 97 RefPtr<T> m_callback; 98 98 RefPtr<ScriptExecutionContext> m_scriptExecutionContext; -
trunk/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.cpp
r186279 r187972 383 383 releaseOriginLockIfNeeded(); 384 384 385 MutexLocker locker(m_statementMutex);385 DeprecatedMutexLocker locker(m_statementMutex); 386 386 m_statementQueue.clear(); 387 387 … … 467 467 void SQLTransactionBackend::enqueueStatementBackend(PassRefPtr<SQLStatementBackend> statementBackend) 468 468 { 469 MutexLocker locker(m_statementMutex);469 DeprecatedMutexLocker locker(m_statementMutex); 470 470 m_statementQueue.append(statementBackend); 471 471 } … … 667 667 m_currentStatementBackend = nullptr; 668 668 669 MutexLocker locker(m_statementMutex);669 DeprecatedMutexLocker locker(m_statementMutex); 670 670 if (!m_statementQueue.isEmpty()) 671 671 m_currentStatementBackend = m_statementQueue.takeFirst(); -
trunk/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.h
r184709 r187972 129 129 bool m_hasVersionMismatch; 130 130 131 Mutex m_statementMutex;131 DeprecatedMutex m_statementMutex; 132 132 Deque<RefPtr<SQLStatementBackend>> m_statementQueue; 133 133 -
trunk/Source/WebCore/bindings/js/WorkerScriptController.cpp
r186279 r187972 151 151 // termination is scheduled, isExecutionTerminating will 152 152 // accurately reflect that state when called from another thread. 153 MutexLocker locker(m_scheduledTerminationMutex);153 DeprecatedMutexLocker locker(m_scheduledTerminationMutex); 154 154 if (m_vm->watchdog) 155 155 m_vm->watchdog->fire(); … … 159 159 { 160 160 // See comments in scheduleExecutionTermination regarding mutex usage. 161 MutexLocker locker(m_scheduledTerminationMutex);161 DeprecatedMutexLocker locker(m_scheduledTerminationMutex); 162 162 if (m_vm->watchdog) 163 163 return m_vm->watchdog->didFire(); -
trunk/Source/WebCore/bindings/js/WorkerScriptController.h
r185608 r187972 98 98 JSC::Strong<JSWorkerGlobalScope> m_workerGlobalScopeWrapper; 99 99 bool m_executionForbidden; 100 mutable Mutex m_scheduledTerminationMutex;100 mutable DeprecatedMutex m_scheduledTerminationMutex; 101 101 }; 102 102 -
trunk/Source/WebCore/dom/default/PlatformMessagePortChannel.cpp
r186279 r187972 89 89 void MessagePortChannel::postMessageToRemote(PassRefPtr<SerializedScriptValue> message, std::unique_ptr<MessagePortChannelArray> channels) 90 90 { 91 MutexLocker lock(m_channel->m_mutex);91 DeprecatedMutexLocker lock(m_channel->m_mutex); 92 92 if (!m_channel->m_outgoingQueue) 93 93 return; … … 99 99 bool MessagePortChannel::tryGetMessageFromRemote(RefPtr<SerializedScriptValue>& message, std::unique_ptr<MessagePortChannelArray>& channels) 100 100 { 101 MutexLocker lock(m_channel->m_mutex);101 DeprecatedMutexLocker lock(m_channel->m_mutex); 102 102 auto result = m_channel->m_incomingQueue->tryGetMessage(); 103 103 if (!result) … … 122 122 { 123 123 // FIXME: What guarantees that the result remains the same after we release the lock? 124 MutexLocker lock(m_channel->m_mutex);124 DeprecatedMutexLocker lock(m_channel->m_mutex); 125 125 return m_channel->m_remotePort == port; 126 126 } … … 129 129 { 130 130 // FIXME: What guarantees that the result remains the same after we release the lock? 131 MutexLocker lock(m_channel->m_mutex);131 DeprecatedMutexLocker lock(m_channel->m_mutex); 132 132 return !m_channel->m_incomingQueue->isEmpty(); 133 133 } … … 135 135 MessagePort* MessagePortChannel::locallyEntangledPort(const ScriptExecutionContext* context) 136 136 { 137 MutexLocker lock(m_channel->m_mutex);137 DeprecatedMutexLocker lock(m_channel->m_mutex); 138 138 // See if both contexts are run by the same thread (are the same context, or are both documents). 139 139 if (m_channel->m_remotePort) { … … 165 165 void PlatformMessagePortChannel::setRemotePort(MessagePort* port) 166 166 { 167 MutexLocker lock(m_mutex);167 DeprecatedMutexLocker lock(m_mutex); 168 168 // Should never set port if it is already set. 169 169 ASSERT(!port || !m_remotePort); … … 176 176 // This lock only guarantees that the returned pointer will not be pointing to released memory, 177 177 // but not that it will still be pointing to this object's entangled port channel. 178 MutexLocker lock(m_mutex);178 DeprecatedMutexLocker lock(m_mutex); 179 179 return m_entangledChannel; 180 180 } … … 182 182 void PlatformMessagePortChannel::closeInternal() 183 183 { 184 MutexLocker lock(m_mutex);184 DeprecatedMutexLocker lock(m_mutex); 185 185 // Disentangle ourselves from the other end. We still maintain a reference to our incoming queue, since previously-existing messages should still be delivered. 186 186 m_remotePort = nullptr; -
trunk/Source/WebCore/dom/default/PlatformMessagePortChannel.h
r184225 r187972 96 96 void closeInternal(); 97 97 98 // Mutex used to ensure exclusive access to the object internals.99 Mutex m_mutex;98 // DeprecatedMutex used to ensure exclusive access to the object internals. 99 DeprecatedMutex m_mutex; 100 100 101 101 // Pointer to our entangled pair - cleared when close() is called. -
trunk/Source/WebCore/loader/icon/IconDatabase.cpp
r186068 r187972 187 187 // Clear the in-memory record of every IconRecord, anything waiting to be read from disk, and anything waiting to be written to disk 188 188 { 189 MutexLocker locker(m_urlAndIconLock);189 DeprecatedMutexLocker locker(m_urlAndIconLock); 190 190 191 191 // Clear the IconRecords for every page URL - RefCounting will cause the IconRecords themselves to be deleted … … 201 201 // Clear all in-memory records of things that need to be synced out to disk 202 202 { 203 MutexLocker locker(m_pendingSyncLock);203 DeprecatedMutexLocker locker(m_pendingSyncLock); 204 204 m_pageURLsPendingSync.clear(); 205 205 m_iconsPendingSync.clear(); … … 208 208 // Clear all in-memory records of things that need to be read in from disk 209 209 { 210 MutexLocker locker(m_pendingReadingLock);210 DeprecatedMutexLocker locker(m_pendingReadingLock); 211 211 m_pageURLsPendingImport.clear(); 212 212 m_pageURLsInterestedInIcons.clear(); … … 230 230 return 0; 231 231 232 MutexLocker locker(m_urlAndIconLock);232 DeprecatedMutexLocker locker(m_urlAndIconLock); 233 233 234 234 performPendingRetainAndReleaseOperations(); … … 246 246 // 2 - The initial url import IS complete and this pageURL has no icon 247 247 if (!pageRecord) { 248 MutexLocker locker(m_pendingReadingLock);248 DeprecatedMutexLocker locker(m_pendingReadingLock); 249 249 250 250 // Import is ongoing, there might be an icon. In this case, register to be notified when the icon comes in … … 277 277 pageURLCopy = pageURLOriginal.isolatedCopy(); 278 278 279 MutexLocker locker(m_pendingReadingLock);279 DeprecatedMutexLocker locker(m_pendingReadingLock); 280 280 m_pageURLsInterestedInIcons.add(pageURLCopy); 281 281 m_iconsPendingReading.add(iconRecord); … … 308 308 return 0; 309 309 310 MutexLocker locker(m_urlAndIconLock);310 DeprecatedMutexLocker locker(m_urlAndIconLock); 311 311 return icon->nativeImageForCurrentFrame(); 312 312 } … … 330 330 return String(); 331 331 332 MutexLocker locker(m_urlAndIconLock);332 DeprecatedMutexLocker locker(m_urlAndIconLock); 333 333 334 334 PageURLRecord* pageRecord = m_pageURLToRecordMap.get(pageURLOriginal); … … 418 418 419 419 { 420 MutexLocker locker(m_urlsToRetainOrReleaseLock);420 DeprecatedMutexLocker locker(m_urlsToRetainOrReleaseLock); 421 421 m_urlsToRetain.add(pageURL.isolatedCopy()); 422 422 m_retainOrReleaseIconRequested = true; … … 451 451 return; 452 452 453 MutexLocker locker(m_pendingSyncLock);453 DeprecatedMutexLocker locker(m_pendingSyncLock); 454 454 // If this pageURL waiting to be sync'ed, update the sync record 455 455 // 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! … … 471 471 472 472 { 473 MutexLocker locker(m_urlsToRetainOrReleaseLock);473 DeprecatedMutexLocker locker(m_urlsToRetainOrReleaseLock); 474 474 m_urlsToRelease.add(pageURL.isolatedCopy()); 475 475 m_retainOrReleaseIconRequested = true; … … 507 507 508 508 { 509 MutexLocker locker(m_pendingReadingLock);509 DeprecatedMutexLocker locker(m_pendingReadingLock); 510 510 511 511 // Since this pageURL is going away, there's no reason anyone would ever be interested in its read results … … 523 523 // Mark stuff for deletion from the database only if we're not in private browsing 524 524 if (!m_privateBrowsingEnabled) { 525 MutexLocker locker(m_pendingSyncLock);525 DeprecatedMutexLocker locker(m_pendingSyncLock); 526 526 m_pageURLsPendingSync.set(pageURLOriginal.isolatedCopy(), pageRecord->snapshot(true)); 527 527 … … 549 549 Vector<String> pageURLs; 550 550 { 551 MutexLocker locker(m_urlAndIconLock);551 DeprecatedMutexLocker locker(m_urlAndIconLock); 552 552 553 553 // If this icon was pending a read, remove it from that set because this new data should override what is on disk 554 554 RefPtr<IconRecord> icon = m_iconURLToRecordMap.get(iconURL); 555 555 if (icon) { 556 MutexLocker locker(m_pendingReadingLock);556 DeprecatedMutexLocker locker(m_pendingReadingLock); 557 557 m_iconsPendingReading.remove(icon.get()); 558 558 } else … … 568 568 // Mark the IconRecord as requiring an update to the database only if private browsing is disabled 569 569 if (!m_privateBrowsingEnabled) { 570 MutexLocker locker(m_pendingSyncLock);570 DeprecatedMutexLocker locker(m_pendingSyncLock); 571 571 m_iconsPendingSync.set(iconURL, icon->snapshot()); 572 572 } … … 609 609 610 610 { 611 MutexLocker locker(m_urlAndIconLock);611 DeprecatedMutexLocker locker(m_urlAndIconLock); 612 612 613 613 PageURLRecord* pageRecord = m_pageURLToRecordMap.get(pageURLOriginal); … … 637 637 LOG(IconDatabase, "Icon for icon url %s is about to be destroyed - removing mapping for it", urlForLogging(iconRecord->iconURL()).ascii().data()); 638 638 m_iconURLToRecordMap.remove(iconRecord->iconURL()); 639 MutexLocker locker(m_pendingReadingLock);639 DeprecatedMutexLocker locker(m_pendingReadingLock); 640 640 m_iconsPendingReading.remove(iconRecord.get()); 641 641 } … … 643 643 // And mark this mapping to be added to the database 644 644 if (!m_privateBrowsingEnabled) { 645 MutexLocker locker(m_pendingSyncLock);645 DeprecatedMutexLocker locker(m_pendingSyncLock); 646 646 m_pageURLsPendingSync.set(pageURL, pageRecord->snapshot()); 647 647 … … 675 675 // 2 - When we get a new icon from the loader, in which case the timestamp is set at that time 676 676 { 677 MutexLocker locker(m_urlAndIconLock);677 DeprecatedMutexLocker locker(m_urlAndIconLock); 678 678 if (IconRecord* icon = m_iconURLToRecordMap.get(iconURL)) { 679 679 LOG(IconDatabase, "Found expiration time on a present icon based on existing IconRecord"); … … 683 683 684 684 // If we don't have a record for it, but we *have* imported all iconURLs from disk, then we should load it now 685 MutexLocker readingLocker(m_pendingReadingLock);685 DeprecatedMutexLocker readingLocker(m_pendingReadingLock); 686 686 if (m_iconURLImportComplete) 687 687 return IconLoadYes; … … 700 700 ASSERT_NOT_SYNC_THREAD(); 701 701 702 MutexLocker locker(m_urlAndIconLock);702 DeprecatedMutexLocker locker(m_urlAndIconLock); 703 703 if (IconRecord* icon = m_iconURLToRecordMap.get(iconURL)) 704 704 return icon->imageDataStatus() != ImageDataStatusUnknown; … … 755 755 size_t IconDatabase::pageURLMappingCount() 756 756 { 757 MutexLocker locker(m_urlAndIconLock);757 DeprecatedMutexLocker locker(m_urlAndIconLock); 758 758 return m_pageURLToRecordMap.size(); 759 759 } … … 761 761 size_t IconDatabase::retainedPageURLCount() 762 762 { 763 MutexLocker locker(m_urlAndIconLock);763 DeprecatedMutexLocker locker(m_urlAndIconLock); 764 764 performPendingRetainAndReleaseOperations(); 765 765 return m_retainedPageURLs.size(); … … 768 768 size_t IconDatabase::iconRecordCount() 769 769 { 770 MutexLocker locker(m_urlAndIconLock);770 DeprecatedMutexLocker locker(m_urlAndIconLock); 771 771 return m_iconURLToRecordMap.size(); 772 772 } … … 774 774 size_t IconDatabase::iconRecordCountWithData() 775 775 { 776 MutexLocker locker(m_urlAndIconLock);776 DeprecatedMutexLocker locker(m_urlAndIconLock); 777 777 size_t result = 0; 778 778 … … 830 830 void IconDatabase::wakeSyncThread() 831 831 { 832 MutexLocker locker(m_syncLock);832 DeprecatedMutexLocker locker(m_syncLock); 833 833 834 834 if (!m_disableSuddenTerminationWhileSyncThreadHasWorkToDo) … … 875 875 bool IconDatabase::isOpenBesidesMainThreadCallbacks() const 876 876 { 877 MutexLocker locker(m_syncLock);877 DeprecatedMutexLocker locker(m_syncLock); 878 878 return m_syncThreadRunning || m_syncDB.isOpen(); 879 879 } … … 881 881 String IconDatabase::databasePath() const 882 882 { 883 MutexLocker locker(m_syncLock);883 DeprecatedMutexLocker locker(m_syncLock); 884 884 return m_completeDatabasePath.isolatedCopy(); 885 885 } … … 917 917 PageURLRecord* pageRecord = m_pageURLToRecordMap.get(pageURL); 918 918 919 MutexLocker locker(m_pendingReadingLock);919 DeprecatedMutexLocker locker(m_pendingReadingLock); 920 920 if (!m_iconURLImportComplete) { 921 921 // 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 … … 986 986 987 987 { 988 MutexLocker locker(m_syncLock);988 DeprecatedMutexLocker locker(m_syncLock); 989 989 if (!m_syncDB.open(m_completeDatabasePath)) { 990 990 LOG_ERROR("Unable to open icon database at path %s - %s", m_completeDatabasePath.ascii().data(), m_syncDB.lastErrorMsg()); … … 1114 1114 1115 1115 { 1116 MutexLocker locker(m_syncLock);1116 DeprecatedMutexLocker locker(m_syncLock); 1117 1117 // Should've been consumed by SQLite, delete just to make sure we don't see it again in the future; 1118 1118 deleteFile(m_completeDatabasePath + "-journal"); … … 1216 1216 1217 1217 { 1218 MutexLocker locker(m_urlAndIconLock);1218 DeprecatedMutexLocker locker(m_urlAndIconLock); 1219 1219 1220 1220 PageURLRecord* pageRecord = m_pageURLToRecordMap.get(pageURL); … … 1249 1249 // Note that WebIconDatabase is not neccessarily API so we might be able to make this change 1250 1250 { 1251 MutexLocker locker(m_pendingReadingLock);1251 DeprecatedMutexLocker locker(m_pendingReadingLock); 1252 1252 if (m_pageURLsPendingImport.contains(pageURL)) { 1253 1253 dispatchDidImportIconURLForPageURLOnMainThread(pageURL); … … 1272 1272 Vector<String> urls; 1273 1273 { 1274 MutexLocker locker(m_pendingReadingLock);1274 DeprecatedMutexLocker locker(m_pendingReadingLock); 1275 1275 1276 1276 urls.appendRange(m_pageURLsPendingImport.begin(), m_pageURLsPendingImport.end()); … … 1285 1285 // Keep a set of ones that are retained and pending notification 1286 1286 { 1287 MutexLocker locker(m_urlAndIconLock);1287 DeprecatedMutexLocker locker(m_urlAndIconLock); 1288 1288 1289 1289 performPendingRetainAndReleaseOperations(); … … 1302 1302 1303 1303 { 1304 MutexLocker locker(m_pendingReadingLock);1304 DeprecatedMutexLocker locker(m_pendingReadingLock); 1305 1305 m_pageURLsInterestedInIcons.remove(urls[i]); 1306 1306 m_iconsPendingReading.remove(iconRecord); 1307 1307 } 1308 1308 { 1309 MutexLocker locker(m_pendingSyncLock);1309 DeprecatedMutexLocker locker(m_pendingSyncLock); 1310 1310 m_iconsPendingSync.set(iconRecord->iconURL(), iconRecord->snapshot(true)); 1311 1311 } … … 1372 1372 1373 1373 { 1374 MutexLocker locker(m_urlAndIconLock);1374 DeprecatedMutexLocker locker(m_urlAndIconLock); 1375 1375 performPendingRetainAndReleaseOperations(); 1376 1376 } … … 1452 1452 1453 1453 { 1454 MutexLocker pendingWorkLocker(m_urlsToRetainOrReleaseLock);1454 DeprecatedMutexLocker pendingWorkLocker(m_urlsToRetainOrReleaseLock); 1455 1455 if (!m_retainOrReleaseIconRequested) 1456 1456 return; … … 1489 1489 Vector<IconRecord*> icons; 1490 1490 { 1491 MutexLocker locker(m_pendingReadingLock);1491 DeprecatedMutexLocker locker(m_pendingReadingLock); 1492 1492 icons.appendRange(m_iconsPendingReading.begin(), m_iconsPendingReading.end()); 1493 1493 } … … 1502 1502 // Verify this icon still wants to be read from disk 1503 1503 { 1504 MutexLocker urlLocker(m_urlAndIconLock);1504 DeprecatedMutexLocker urlLocker(m_urlAndIconLock); 1505 1505 { 1506 MutexLocker readLocker(m_pendingReadingLock);1506 DeprecatedMutexLocker readLocker(m_pendingReadingLock); 1507 1507 1508 1508 if (m_iconsPendingReading.contains(icons[i])) { … … 1592 1592 // asked for by the database on the main thread 1593 1593 { 1594 MutexLocker locker(m_urlAndIconLock);1594 DeprecatedMutexLocker locker(m_urlAndIconLock); 1595 1595 Vector<IconSnapshot> iconSnapshots; 1596 1596 Vector<PageURLSnapshot> pageSnapshots; 1597 1597 { 1598 MutexLocker locker(m_pendingSyncLock);1598 DeprecatedMutexLocker locker(m_pendingSyncLock); 1599 1599 1600 1600 iconSnapshots.appendRange(m_iconsPendingSync.begin().values(), m_iconsPendingSync.end().values()); … … 1659 1659 int result; 1660 1660 while ((result = pageSQL.step()) == SQLITE_ROW) { 1661 MutexLocker locker(m_urlAndIconLock);1661 DeprecatedMutexLocker locker(m_urlAndIconLock); 1662 1662 if (!m_pageURLToRecordMap.contains(pageSQL.getColumnText(1))) 1663 1663 pageIDsToDelete.append(pageSQL.getColumnInt64(0)); … … 1792 1792 1793 1793 // Close the database 1794 MutexLocker locker(m_syncLock);1794 DeprecatedMutexLocker locker(m_syncLock); 1795 1795 1796 1796 m_databaseDirectory = String(); -
trunk/Source/WebCore/loader/icon/IconDatabase.h
r180301 r187972 142 142 bool m_privateBrowsingEnabled; 143 143 144 mutable Mutex m_syncLock;144 mutable DeprecatedMutex m_syncLock; 145 145 ThreadCondition m_syncCondition; 146 146 String m_databaseDirectory; … … 154 154 std::unique_ptr<SuddenTerminationDisabler> m_disableSuddenTerminationWhileSyncThreadHasWorkToDo; 155 155 156 Mutex m_urlAndIconLock;156 DeprecatedMutex m_urlAndIconLock; 157 157 // Holding m_urlAndIconLock is required when accessing any of the following data structures or the objects they contain 158 158 HashMap<String, IconRecord*> m_iconURLToRecordMap; … … 160 160 HashSet<String> m_retainedPageURLs; 161 161 162 Mutex m_pendingSyncLock;162 DeprecatedMutex m_pendingSyncLock; 163 163 // Holding m_pendingSyncLock is required when accessing any of the following data structures 164 164 HashMap<String, PageURLSnapshot> m_pageURLsPendingSync; 165 165 HashMap<String, IconSnapshot> m_iconsPendingSync; 166 166 167 Mutex m_pendingReadingLock;167 DeprecatedMutex m_pendingReadingLock; 168 168 // Holding m_pendingSyncLock is required when accessing any of the following data structures - when dealing with IconRecord*s, holding m_urlAndIconLock is also required 169 169 HashSet<String> m_pageURLsPendingImport; … … 171 171 HashSet<IconRecord*> m_iconsPendingReading; 172 172 173 Mutex m_urlsToRetainOrReleaseLock;173 DeprecatedMutex m_urlsToRetainOrReleaseLock; 174 174 // Holding m_urlsToRetainOrReleaseLock is required when accessing any of the following data structures. 175 175 HashCountedSet<String> m_urlsToRetain; -
trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp
r184596 r187972 50 50 { 51 51 // This method is invoked by the event handling thread 52 MutexLocker lock(m_mutex);52 DeprecatedMutexLocker lock(m_mutex); 53 53 54 54 bool shouldSetLatch = wheelEvent.shouldConsiderLatching(); … … 116 116 || rootNode->hasChangedProperty(ScrollingStateFrameScrollingNode::NonFastScrollableRegion) 117 117 || rootNode->hasChangedProperty(ScrollingStateNode::ScrollLayer))) { 118 MutexLocker lock(m_mutex);118 DeprecatedMutexLocker lock(m_mutex); 119 119 120 120 if (rootStateNodeChanged || rootNode->hasChangedProperty(ScrollingStateNode::ScrollLayer)) … … 209 209 void ScrollingTree::setMainFramePinState(bool pinnedToTheLeft, bool pinnedToTheRight, bool pinnedToTheTop, bool pinnedToTheBottom) 210 210 { 211 MutexLocker locker(m_swipeStateMutex);211 DeprecatedMutexLocker locker(m_swipeStateMutex); 212 212 213 213 m_mainFramePinnedToTheLeft = pinnedToTheLeft; … … 219 219 FloatPoint ScrollingTree::mainFrameScrollPosition() 220 220 { 221 MutexLocker lock(m_mutex);221 DeprecatedMutexLocker lock(m_mutex); 222 222 return m_mainFrameScrollPosition; 223 223 } … … 225 225 void ScrollingTree::setMainFrameScrollPosition(FloatPoint position) 226 226 { 227 MutexLocker lock(m_mutex);227 DeprecatedMutexLocker lock(m_mutex); 228 228 m_mainFrameScrollPosition = position; 229 229 } … … 231 231 bool ScrollingTree::isPointInNonFastScrollableRegion(IntPoint p) 232 232 { 233 MutexLocker lock(m_mutex);233 DeprecatedMutexLocker lock(m_mutex); 234 234 235 235 return m_nonFastScrollableRegion.contains(p); … … 238 238 bool ScrollingTree::isRubberBandInProgress() 239 239 { 240 MutexLocker lock(m_mutex);240 DeprecatedMutexLocker lock(m_mutex); 241 241 242 242 return m_mainFrameIsRubberBanding; … … 245 245 void ScrollingTree::setMainFrameIsRubberBanding(bool isRubberBanding) 246 246 { 247 MutexLocker locker(m_mutex);247 DeprecatedMutexLocker locker(m_mutex); 248 248 249 249 m_mainFrameIsRubberBanding = isRubberBanding; … … 252 252 bool ScrollingTree::isScrollSnapInProgress() 253 253 { 254 MutexLocker lock(m_mutex);254 DeprecatedMutexLocker lock(m_mutex); 255 255 256 256 return m_mainFrameIsScrollSnapping; … … 259 259 void ScrollingTree::setMainFrameIsScrollSnapping(bool isScrollSnapping) 260 260 { 261 MutexLocker locker(m_mutex);261 DeprecatedMutexLocker locker(m_mutex); 262 262 263 263 m_mainFrameIsScrollSnapping = isScrollSnapping; … … 266 266 void ScrollingTree::setCanRubberBandState(bool canRubberBandAtLeft, bool canRubberBandAtRight, bool canRubberBandAtTop, bool canRubberBandAtBottom) 267 267 { 268 MutexLocker locker(m_swipeStateMutex);268 DeprecatedMutexLocker locker(m_swipeStateMutex); 269 269 270 270 m_rubberBandsAtLeft = canRubberBandAtLeft; … … 276 276 bool ScrollingTree::rubberBandsAtLeft() 277 277 { 278 MutexLocker lock(m_swipeStateMutex);278 DeprecatedMutexLocker lock(m_swipeStateMutex); 279 279 280 280 return m_rubberBandsAtLeft; … … 283 283 bool ScrollingTree::rubberBandsAtRight() 284 284 { 285 MutexLocker lock(m_swipeStateMutex);285 DeprecatedMutexLocker lock(m_swipeStateMutex); 286 286 287 287 return m_rubberBandsAtRight; … … 290 290 bool ScrollingTree::rubberBandsAtBottom() 291 291 { 292 MutexLocker lock(m_swipeStateMutex);292 DeprecatedMutexLocker lock(m_swipeStateMutex); 293 293 294 294 return m_rubberBandsAtBottom; … … 297 297 bool ScrollingTree::rubberBandsAtTop() 298 298 { 299 MutexLocker lock(m_swipeStateMutex);299 DeprecatedMutexLocker lock(m_swipeStateMutex); 300 300 301 301 return m_rubberBandsAtTop; … … 309 309 void ScrollingTree::setScrollPinningBehavior(ScrollPinningBehavior pinning) 310 310 { 311 MutexLocker locker(m_swipeStateMutex);311 DeprecatedMutexLocker locker(m_swipeStateMutex); 312 312 313 313 m_scrollPinningBehavior = pinning; … … 316 316 ScrollPinningBehavior ScrollingTree::scrollPinningBehavior() 317 317 { 318 MutexLocker lock(m_swipeStateMutex);318 DeprecatedMutexLocker lock(m_swipeStateMutex); 319 319 320 320 return m_scrollPinningBehavior; … … 326 326 return false; 327 327 328 MutexLocker lock(m_swipeStateMutex);328 DeprecatedMutexLocker lock(m_swipeStateMutex); 329 329 330 330 if (wheelEvent.deltaX() > 0 && m_mainFramePinnedToTheLeft && !m_rubberBandsAtLeft) … … 352 352 ScrollingNodeID ScrollingTree::latchedNode() 353 353 { 354 MutexLocker locker(m_mutex);354 DeprecatedMutexLocker locker(m_mutex); 355 355 return m_latchedNode; 356 356 } … … 358 358 void ScrollingTree::setLatchedNode(ScrollingNodeID node) 359 359 { 360 MutexLocker locker(m_mutex);360 DeprecatedMutexLocker locker(m_mutex); 361 361 m_latchedNode = node; 362 362 } … … 364 364 void ScrollingTree::clearLatchedNode() 365 365 { 366 MutexLocker locker(m_mutex);366 DeprecatedMutexLocker locker(m_mutex); 367 367 m_latchedNode = 0; 368 368 } -
trunk/Source/WebCore/page/scrolling/ScrollingTree.h
r185762 r187972 161 161 ScrollingTreeNodeMap m_nodeMap; 162 162 163 Mutex m_mutex;163 DeprecatedMutex m_mutex; 164 164 Region m_nonFastScrollableRegion; 165 165 FloatPoint m_mainFrameScrollPosition; 166 166 167 Mutex m_swipeStateMutex;167 DeprecatedMutex m_swipeStateMutex; 168 168 ScrollPinningBehavior m_scrollPinningBehavior { DoNotPin }; 169 169 ScrollingNodeID m_latchedNode { 0 }; -
trunk/Source/WebCore/platform/MemoryPressureHandler.h
r185206 r187972 138 138 void (^m_releaseMemoryBlock)(); 139 139 CFRunLoopObserverRef m_observer; 140 Mutex m_observerMutex;140 DeprecatedMutex m_observerMutex; 141 141 #elif OS(LINUX) 142 142 int m_eventFD; -
trunk/Source/WebCore/platform/audio/HRTFDatabaseLoader.cpp
r176259 r187972 103 103 ASSERT(isMainThread()); 104 104 105 MutexLocker locker(m_threadLock);105 DeprecatedMutexLocker locker(m_threadLock); 106 106 107 107 if (!m_hrtfDatabase.get() && !m_databaseLoaderThread) { … … 118 118 void HRTFDatabaseLoader::waitForLoaderThreadCompletion() 119 119 { 120 MutexLocker locker(m_threadLock);120 DeprecatedMutexLocker locker(m_threadLock); 121 121 122 122 // waitForThreadCompletion() should not be called twice for the same thread. -
trunk/Source/WebCore/platform/audio/HRTFDatabaseLoader.h
r165676 r187972 77 77 78 78 // Holding a m_threadLock is required when accessing m_databaseLoaderThread. 79 Mutex m_threadLock;79 DeprecatedMutex m_threadLock; 80 80 ThreadIdentifier m_databaseLoaderThread; 81 81 -
trunk/Source/WebCore/platform/cocoa/MemoryPressureHandlerCocoa.mm
r186075 r187972 257 257 258 258 { 259 MutexLocker locker(m_observerMutex);259 DeprecatedMutexLocker locker(m_observerMutex); 260 260 if (!m_observer) { 261 261 m_observer = CFRunLoopObserverCreate(NULL, kCFRunLoopBeforeWaiting | kCFRunLoopExit, NO /* don't repeat */, … … 273 273 274 274 { 275 MutexLocker locker(m_observerMutex);275 DeprecatedMutexLocker locker(m_observerMutex); 276 276 m_memoryPressureReason = MemoryPressureReasonNone; 277 277 } … … 280 280 bool MemoryPressureHandler::shouldWaitForMemoryClearMessage() 281 281 { 282 MutexLocker locker(m_observerMutex);282 DeprecatedMutexLocker locker(m_observerMutex); 283 283 return m_memoryPressureReason & MemoryPressureReasonVMStatus; 284 284 } … … 289 289 290 290 { 291 MutexLocker locker(m_observerMutex);291 DeprecatedMutexLocker locker(m_observerMutex); 292 292 m_observer = 0; 293 293 } -
trunk/Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp
r182985 r187972 90 90 91 91 { 92 MutexLocker lock(m_mutex);92 DeprecatedMutexLocker lock(m_mutex); 93 93 if (!m_scheduled) 94 94 ++m_unscheduledFireCount; … … 122 122 123 123 { 124 MutexLocker lock(m_mutex);124 DeprecatedMutexLocker lock(m_mutex); 125 125 m_previousFrameDone = true; 126 126 } -
trunk/Source/WebCore/platform/graphics/DisplayRefreshMonitor.h
r182985 r187972 73 73 void setMonotonicAnimationStartTime(double startTime) { m_monotonicAnimationStartTime = startTime; } 74 74 75 Mutex& mutex() { return m_mutex; }75 DeprecatedMutex& mutex() { return m_mutex; } 76 76 77 77 static RefPtr<DisplayRefreshMonitor> createDefaultDisplayRefreshMonitor(PlatformDisplayID); … … 90 90 int m_unscheduledFireCount; // Number of times the display link has fired with no clients. 91 91 PlatformDisplayID m_displayID; 92 Mutex m_mutex;92 DeprecatedMutex m_mutex; 93 93 94 94 HashSet<DisplayRefreshMonitorClient*> m_clients; -
trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp
r185958 r187972 741 741 void MediaPlayerPrivateAVFoundation::setDelayCallbacks(bool delay) const 742 742 { 743 MutexLocker lock(m_queueMutex);743 DeprecatedMutexLocker lock(m_queueMutex); 744 744 if (delay) 745 745 ++m_delayCallbacks; … … 760 760 void MediaPlayerPrivateAVFoundation::clearMainThreadPendingFlag() 761 761 { 762 MutexLocker lock(m_queueMutex);762 DeprecatedMutexLocker lock(m_queueMutex); 763 763 m_mainThreadCallPending = false; 764 764 } … … 826 826 Notification notification = Notification(); 827 827 { 828 MutexLocker lock(m_queueMutex);828 DeprecatedMutexLocker lock(m_queueMutex); 829 829 830 830 if (m_queuedNotifications.isEmpty()) -
trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h
r187163 r187972 318 318 319 319 Vector<Notification> m_queuedNotifications; 320 mutable Mutex m_queueMutex;320 mutable DeprecatedMutex m_queueMutex; 321 321 322 322 mutable std::unique_ptr<PlatformTimeRanges> m_cachedLoadedTimeRanges; -
trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp
r186798 r187972 158 158 inline void* callbackContext() const { return reinterpret_cast<void*>(m_objectID); } 159 159 160 static Mutex& mapLock();160 static DeprecatedMutex& mapLock(); 161 161 static HashMap<uintptr_t, AVFWrapper*>& map(); 162 162 static AVFWrapper* avfWrapperForCallbackContext(void*); … … 1404 1404 } 1405 1405 1406 Mutex& AVFWrapper::mapLock()1407 { 1408 static Mutex mapLock;1406 DeprecatedMutex& AVFWrapper::mapLock() 1407 { 1408 static DeprecatedMutex mapLock; 1409 1409 return mapLock; 1410 1410 } … … 1418 1418 void AVFWrapper::addToMap() 1419 1419 { 1420 MutexLocker locker(mapLock());1420 DeprecatedMutexLocker locker(mapLock()); 1421 1421 1422 1422 // HashMap doesn't like a key of 0, and also make sure we aren't … … 1434 1434 LOG(Media, "AVFWrapper::removeFromMap(%p %d)", this, m_objectID); 1435 1435 1436 MutexLocker locker(mapLock());1436 DeprecatedMutexLocker locker(mapLock()); 1437 1437 map().remove(m_objectID); 1438 1438 } … … 1635 1635 void AVFWrapper::periodicTimeObserverCallback(AVCFPlayerRef, CMTime cmTime, void* context) 1636 1636 { 1637 MutexLocker locker(mapLock());1637 DeprecatedMutexLocker locker(mapLock()); 1638 1638 AVFWrapper* self = avfWrapperForCallbackContext(context); 1639 1639 if (!self) { … … 1666 1666 std::unique_ptr<NotificationCallbackData> notificationData { static_cast<NotificationCallbackData*>(context) }; 1667 1667 1668 MutexLocker locker(mapLock());1668 DeprecatedMutexLocker locker(mapLock()); 1669 1669 AVFWrapper* self = avfWrapperForCallbackContext(notificationData->m_context); 1670 1670 if (!self) { … … 1721 1721 void AVFWrapper::loadPlayableCompletionCallback(AVCFAssetRef, void* context) 1722 1722 { 1723 MutexLocker locker(mapLock());1723 DeprecatedMutexLocker locker(mapLock()); 1724 1724 AVFWrapper* self = avfWrapperForCallbackContext(context); 1725 1725 if (!self) { … … 1749 1749 void AVFWrapper::loadMetadataCompletionCallback(AVCFAssetRef, void* context) 1750 1750 { 1751 MutexLocker locker(mapLock());1751 DeprecatedMutexLocker locker(mapLock()); 1752 1752 AVFWrapper* self = avfWrapperForCallbackContext(context); 1753 1753 if (!self) { … … 1769 1769 void AVFWrapper::seekCompletedCallback(AVCFPlayerItemRef, Boolean finished, void* context) 1770 1770 { 1771 MutexLocker locker(mapLock());1771 DeprecatedMutexLocker locker(mapLock()); 1772 1772 AVFWrapper* self = avfWrapperForCallbackContext(context); 1773 1773 if (!self) { … … 1812 1812 std::unique_ptr<LegibleOutputData> legibleOutputData(reinterpret_cast<LegibleOutputData*>(context)); 1813 1813 1814 MutexLocker locker(mapLock());1814 DeprecatedMutexLocker locker(mapLock()); 1815 1815 AVFWrapper* self = avfWrapperForCallbackContext(legibleOutputData->m_context); 1816 1816 if (!self) { … … 1828 1828 { 1829 1829 ASSERT(!isMainThread()); 1830 MutexLocker locker(mapLock());1830 DeprecatedMutexLocker locker(mapLock()); 1831 1831 AVFWrapper* self = avfWrapperForCallbackContext(context); 1832 1832 if (!self) { … … 1866 1866 std::unique_ptr<LoadRequestData> loadRequestData(reinterpret_cast<LoadRequestData*>(context)); 1867 1867 1868 MutexLocker locker(mapLock());1868 DeprecatedMutexLocker locker(mapLock()); 1869 1869 AVFWrapper* self = avfWrapperForCallbackContext(loadRequestData->m_context); 1870 1870 if (!self) { … … 1922 1922 { 1923 1923 ASSERT(dispatch_get_main_queue() != dispatch_get_current_queue()); 1924 MutexLocker locker(mapLock());1924 DeprecatedMutexLocker locker(mapLock()); 1925 1925 AVFWrapper* self = avfWrapperForCallbackContext(context); 1926 1926 if (!self) { -
trunk/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp
r166643 r187972 78 78 m_sampleTimerHandler.cancel(); 79 79 { 80 MutexLocker lock(m_sampleMutex);80 DeprecatedMutexLocker lock(m_sampleMutex); 81 81 m_pendingSamples.append(sample); 82 82 } … … 93 93 Vector<GRefPtr<GstSample> > samples; 94 94 { 95 MutexLocker lock(m_sampleMutex);95 DeprecatedMutexLocker lock(m_sampleMutex); 96 96 m_pendingSamples.swap(samples); 97 97 } -
trunk/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h
r185502 r187972 68 68 Vector<GRefPtr<GstSample> > m_pendingSamples; 69 69 String m_streamId; 70 Mutex m_sampleMutex;70 DeprecatedMutex m_sampleMutex; 71 71 }; 72 72 -
trunk/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp
r185502 r187972 103 103 g_object_get(m_pad.get(), "tags", &tags.outPtr(), NULL); 104 104 { 105 MutexLocker lock(m_tagMutex);105 DeprecatedMutexLocker lock(m_tagMutex); 106 106 m_tags.swap(tags); 107 107 } … … 159 159 GRefPtr<GstTagList> tags; 160 160 { 161 MutexLocker lock(m_tagMutex);161 DeprecatedMutexLocker lock(m_tagMutex); 162 162 tags.swap(m_tags); 163 163 } -
trunk/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h
r185502 r187972 74 74 GThreadSafeMainLoopSource m_tagTimerHandler; 75 75 76 Mutex m_tagMutex;76 DeprecatedMutex m_tagMutex; 77 77 GRefPtr<GstTagList> m_tags; 78 78 }; -
trunk/Source/WebCore/platform/graphics/mac/DisplayRefreshMonitorMac.cpp
r169299 r187972 85 85 } 86 86 87 MutexLocker lock(mutex());87 DeprecatedMutexLocker lock(mutex()); 88 88 setIsScheduled(true); 89 89 return true; … … 92 92 void DisplayRefreshMonitorMac::displayLinkFired(double nowSeconds, double outputTimeSeconds) 93 93 { 94 MutexLocker lock(mutex());94 DeprecatedMutexLocker lock(mutex()); 95 95 if (!isPreviousFrameDone()) 96 96 return; -
trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp
r182160 r187972 513 513 void MediaPlayerPrivateMediaFoundation::addListener(MediaPlayerListener* listener) 514 514 { 515 MutexLocker locker(m_mutexListeners);515 DeprecatedMutexLocker locker(m_mutexListeners); 516 516 517 517 m_listeners.add(listener); … … 520 520 void MediaPlayerPrivateMediaFoundation::removeListener(MediaPlayerListener* listener) 521 521 { 522 MutexLocker locker(m_mutexListeners);522 DeprecatedMutexLocker locker(m_mutexListeners); 523 523 524 524 m_listeners.remove(listener); … … 527 527 void MediaPlayerPrivateMediaFoundation::notifyDeleted() 528 528 { 529 MutexLocker locker(m_mutexListeners);529 DeprecatedMutexLocker locker(m_mutexListeners); 530 530 531 531 for (HashSet<MediaPlayerListener*>::const_iterator it = m_listeners.begin(); it != m_listeners.end(); ++it) … … 705 705 HRESULT STDMETHODCALLTYPE MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke(__RPC__in_opt IMFAsyncResult *pAsyncResult) 706 706 { 707 MutexLocker locker(m_mutex);707 DeprecatedMutexLocker locker(m_mutex); 708 708 709 709 if (!m_mediaPlayer) … … 720 720 void MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted() 721 721 { 722 MutexLocker locker(m_mutex);722 DeprecatedMutexLocker locker(m_mutex); 723 723 724 724 m_mediaPlayer = nullptr; -
trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h
r182160 r187972 90 90 class MediaPlayerListener; 91 91 HashSet<MediaPlayerListener*> m_listeners; 92 Mutex m_mutexListeners;92 DeprecatedMutex m_mutexListeners; 93 93 94 94 COMPtr<IMFMediaSession> m_mediaSession; … … 150 150 MediaPlayerPrivateMediaFoundation* m_mediaPlayer; 151 151 bool m_event; 152 Mutex m_mutex;152 DeprecatedMutex m_mutex; 153 153 }; 154 154 -
trunk/Source/WebCore/platform/ios/LegacyTileCache.h
r185461 r187972 212 212 float m_pendingZoomedOutScale; 213 213 214 mutable Mutex m_tileMutex;215 mutable Mutex m_savedDisplayRectMutex;216 mutable Mutex m_contentReplacementImageMutex;214 mutable DeprecatedMutex m_tileMutex; 215 mutable DeprecatedMutex m_savedDisplayRectMutex; 216 mutable DeprecatedMutex m_contentReplacementImageMutex; 217 217 218 218 bool m_tileControllerShouldUseLowScaleTiles; -
trunk/Source/WebCore/platform/ios/LegacyTileCache.mm
r185461 r187972 148 148 return; 149 149 150 MutexLocker locker(m_tileMutex);150 DeprecatedMutexLocker locker(m_tileMutex); 151 151 152 152 m_tilesOpaque = opaque; … … 161 161 return; 162 162 163 MutexLocker locker(m_tileMutex);163 DeprecatedMutexLocker locker(m_tileMutex); 164 164 LegacyTileGrid* activeGrid = activeTileGrid(); 165 165 // Even though we aren't actually creating tiles in the inactive grid, we … … 201 201 // Tile invalidation is normally suspended during zooming by UIKit but some applications 202 202 // using custom scrollviews may zoom without triggering the callbacks. Invalidate the tiles explicitly. 203 MutexLocker locker(m_tileMutex);203 DeprecatedMutexLocker locker(m_tileMutex); 204 204 activeTileGrid()->dropAllTiles(); 205 205 activeTileGrid()->createTiles(CoverVisibleOnly); … … 226 226 ASSERT(m_tilingMode != Disabled); 227 227 228 MutexLocker locker(m_tileMutex);228 DeprecatedMutexLocker locker(m_tileMutex); 229 229 230 230 if (m_pendingZoomedOutScale) { … … 315 315 m_tilingMode = Minimal; 316 316 317 MutexLocker locker(m_tileMutex);317 DeprecatedMutexLocker locker(m_tileMutex); 318 318 LegacyTileGrid* activeGrid = activeTileGrid(); 319 319 if (activeGrid->checkDoSingleTileLayout()) { … … 328 328 { 329 329 ASSERT(WebThreadIsLockedOrDisabled()); 330 MutexLocker locker(m_tileMutex);330 DeprecatedMutexLocker locker(m_tileMutex); 331 331 332 332 activeTileGrid()->addTilesCoveringRect(rect); … … 335 335 void LegacyTileCache::removeAllNonVisibleTiles() 336 336 { 337 MutexLocker locker(m_tileMutex);337 DeprecatedMutexLocker locker(m_tileMutex); 338 338 removeAllNonVisibleTilesInternal(); 339 339 } … … 357 357 void LegacyTileCache::removeAllTiles() 358 358 { 359 MutexLocker locker(m_tileMutex);359 DeprecatedMutexLocker locker(m_tileMutex); 360 360 m_zoomedOutTileGrid->dropAllTiles(); 361 361 if (m_zoomedInTileGrid) … … 365 365 void LegacyTileCache::removeForegroundTiles() 366 366 { 367 MutexLocker locker(m_tileMutex);367 DeprecatedMutexLocker locker(m_tileMutex); 368 368 if (!keepsZoomedOutTiles()) 369 369 m_zoomedOutTileGrid->dropAllTiles(); … … 374 374 void LegacyTileCache::setContentReplacementImage(RetainPtr<CGImageRef> contentReplacementImage) 375 375 { 376 MutexLocker locker(m_contentReplacementImageMutex);376 DeprecatedMutexLocker locker(m_contentReplacementImageMutex); 377 377 m_contentReplacementImage = contentReplacementImage; 378 378 } … … 380 380 RetainPtr<CGImageRef> LegacyTileCache::contentReplacementImage() const 381 381 { 382 MutexLocker locker(m_contentReplacementImageMutex);382 DeprecatedMutexLocker locker(m_contentReplacementImageMutex); 383 383 return m_contentReplacementImage; 384 384 } … … 427 427 if (isTileCreationSuspended()) 428 428 return; 429 MutexLocker locker(m_tileMutex);429 DeprecatedMutexLocker locker(m_tileMutex); 430 430 createTilesInActiveGrid(CoverSpeculative); 431 431 } … … 621 621 void LegacyTileCache::setNeedsDisplayInRect(const IntRect& dirtyRect) 622 622 { 623 MutexLocker locker(m_savedDisplayRectMutex);623 DeprecatedMutexLocker locker(m_savedDisplayRectMutex); 624 624 bool addedFirstRect = m_savedDisplayRects.isEmpty(); 625 625 m_savedDisplayRects.append(dirtyRect); … … 693 693 return; 694 694 695 MutexLocker locker(m_tileMutex);695 DeprecatedMutexLocker locker(m_tileMutex); 696 696 createTilesInActiveGrid(CoverVisibleOnly); 697 697 … … 711 711 commitScaleChange(); 712 712 else if (wasZooming) { 713 MutexLocker locker(m_tileMutex);713 DeprecatedMutexLocker locker(m_tileMutex); 714 714 bringActiveTileGridToFront(); 715 715 } … … 754 754 if (isTileInvalidationSuspended()) 755 755 return; 756 MutexLocker locker(m_tileMutex);756 DeprecatedMutexLocker locker(m_tileMutex); 757 757 flushSavedDisplayRects(); 758 758 } … … 765 765 Vector<IntRect> rects; 766 766 { 767 MutexLocker locker(m_savedDisplayRectMutex);767 DeprecatedMutexLocker locker(m_savedDisplayRectMutex); 768 768 m_savedDisplayRects.swap(rects); 769 769 } … … 793 793 794 794 if (!m_savedDisplayRects.isEmpty()) { 795 MutexLocker locker(m_tileMutex);795 DeprecatedMutexLocker locker(m_tileMutex); 796 796 flushSavedDisplayRects(); 797 797 } -
trunk/Source/WebCore/platform/ios/LegacyTileLayerPool.h
r183234 r187972 76 76 unsigned m_totalBytes; 77 77 unsigned m_capacity; 78 Mutex m_layerPoolMutex;78 DeprecatedMutex m_layerPoolMutex; 79 79 80 80 double m_lastAddTime; -
trunk/Source/WebCore/platform/ios/LegacyTileLayerPool.mm
r180225 r187972 85 85 } 86 86 87 MutexLocker locker(m_layerPoolMutex);87 DeprecatedMutexLocker locker(m_layerPoolMutex); 88 88 listOfLayersWithSize(layerSize).prepend(layer); 89 89 m_totalBytes += bytesBackingLayerWithPixelSize(layerSize); … … 97 97 if (!canReuseLayerWithSize(size)) 98 98 return nil; 99 MutexLocker locker(m_layerPoolMutex);99 DeprecatedMutexLocker locker(m_layerPoolMutex); 100 100 LayerList& reuseList = listOfLayersWithSize(size, MarkAsUsed); 101 101 if (reuseList.isEmpty()) … … 107 107 void LegacyTileLayerPool::setCapacity(unsigned capacity) 108 108 { 109 MutexLocker reuseLocker(m_layerPoolMutex);109 DeprecatedMutexLocker reuseLocker(m_layerPoolMutex); 110 110 if (capacity < m_capacity) 111 111 schedulePrune(); … … 137 137 void LegacyTileLayerPool::prune() 138 138 { 139 MutexLocker locker(m_layerPoolMutex);139 DeprecatedMutexLocker locker(m_layerPoolMutex); 140 140 ASSERT(m_needsPrune); 141 141 m_needsPrune = false; … … 164 164 void LegacyTileLayerPool::drain() 165 165 { 166 MutexLocker reuseLocker(m_layerPoolMutex);166 DeprecatedMutexLocker reuseLocker(m_layerPoolMutex); 167 167 m_reuseLists.clear(); 168 168 m_sizesInPruneOrder.clear(); -
trunk/Source/WebCore/platform/network/curl/CurlDownload.cpp
r187436 r187972 61 61 bool CurlDownloadManager::add(CURL* curlHandle) 62 62 { 63 MutexLocker locker(m_mutex);63 DeprecatedMutexLocker locker(m_mutex); 64 64 65 65 m_pendingHandleList.append(curlHandle); … … 71 71 bool CurlDownloadManager::remove(CURL* curlHandle) 72 72 { 73 MutexLocker locker(m_mutex);73 DeprecatedMutexLocker locker(m_mutex); 74 74 75 75 m_removedHandleList.append(curlHandle); … … 80 80 int CurlDownloadManager::getActiveDownloadCount() const 81 81 { 82 MutexLocker locker(m_mutex);82 DeprecatedMutexLocker locker(m_mutex); 83 83 return m_activeHandleList.size(); 84 84 } … … 86 86 int CurlDownloadManager::getPendingDownloadCount() const 87 87 { 88 MutexLocker locker(m_mutex);88 DeprecatedMutexLocker locker(m_mutex); 89 89 return m_pendingHandleList.size(); 90 90 } … … 112 112 void CurlDownloadManager::stopThreadIfIdle() 113 113 { 114 MutexLocker locker(m_mutex);114 DeprecatedMutexLocker locker(m_mutex); 115 115 116 116 if (!getActiveDownloadCount() && !getPendingDownloadCount()) … … 120 120 void CurlDownloadManager::updateHandleList() 121 121 { 122 MutexLocker locker(m_mutex);122 DeprecatedMutexLocker locker(m_mutex); 123 123 124 124 // Remove curl easy handles from multi list … … 246 246 CurlDownload::~CurlDownload() 247 247 { 248 MutexLocker locker(m_mutex);248 DeprecatedMutexLocker locker(m_mutex); 249 249 250 250 if (m_url) … … 263 263 return; 264 264 265 MutexLocker locker(m_mutex);265 DeprecatedMutexLocker locker(m_mutex); 266 266 267 267 m_curlHandle = curl_easy_init(); … … 296 296 return; 297 297 298 MutexLocker locker(m_mutex);298 DeprecatedMutexLocker locker(m_mutex); 299 299 300 300 URL url(ParsedURLString, request.url()); … … 318 318 String CurlDownload::getTempPath() const 319 319 { 320 MutexLocker locker(m_mutex);320 DeprecatedMutexLocker locker(m_mutex); 321 321 return m_tempPath; 322 322 } … … 324 324 String CurlDownload::getUrl() const 325 325 { 326 MutexLocker locker(m_mutex);326 DeprecatedMutexLocker locker(m_mutex); 327 327 return String(m_url); 328 328 } … … 330 330 ResourceResponse CurlDownload::getResponse() const 331 331 { 332 MutexLocker locker(m_mutex);332 DeprecatedMutexLocker locker(m_mutex); 333 333 return m_response; 334 334 } … … 336 336 void CurlDownload::closeFile() 337 337 { 338 MutexLocker locker(m_mutex);338 DeprecatedMutexLocker locker(m_mutex); 339 339 340 340 if (m_tempHandle != invalidPlatformFileHandle) { … … 391 391 void CurlDownload::didReceiveHeader(const String& header) 392 392 { 393 MutexLocker locker(m_mutex);393 DeprecatedMutexLocker locker(m_mutex); 394 394 395 395 if (header == "\r\n" || header == "\n") { … … 431 431 void CurlDownload::didReceiveData(void* data, int size) 432 432 { 433 MutexLocker locker(m_mutex);433 DeprecatedMutexLocker locker(m_mutex); 434 434 435 435 RefPtr<CurlDownload> protectedDownload(this); … … 465 465 void CurlDownload::didFail() 466 466 { 467 MutexLocker locker(m_mutex);467 DeprecatedMutexLocker locker(m_mutex); 468 468 469 469 closeFile(); -
trunk/Source/WebCore/platform/network/curl/CurlDownload.h
r187436 r187972 74 74 Vector<CURL*> m_activeHandleList; 75 75 Vector<CURL*> m_removedHandleList; 76 mutable Mutex m_mutex;76 mutable DeprecatedMutex m_mutex; 77 77 bool m_runThread; 78 78 }; … … 141 141 WebCore::ResourceResponse m_response; 142 142 bool m_deletesFileUponFailure; 143 mutable Mutex m_mutex;143 mutable DeprecatedMutex m_mutex; 144 144 CurlDownloadListener *m_listener; 145 145 -
trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp
r186476 r187972 134 134 } 135 135 136 static Mutex* sharedResourceMutex(curl_lock_data data) { 137 DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, cookieMutex, ()); 138 DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, dnsMutex, ()); 139 DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, shareMutex, ()); 136 static DeprecatedMutex* sharedResourceMutex(curl_lock_data data) 137 { 138 DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, cookieMutex, ()); 139 DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, dnsMutex, ()); 140 DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, shareMutex, ()); 140 141 141 142 switch (data) { … … 191 192 static void curl_lock_callback(CURL* /* handle */, curl_lock_data data, curl_lock_access /* access */, void* /* userPtr */) 192 193 { 193 if ( Mutex* mutex = sharedResourceMutex(data))194 if (DeprecatedMutex* mutex = sharedResourceMutex(data)) 194 195 mutex->lock(); 195 196 } … … 197 198 static void curl_unlock_callback(CURL* /* handle */, curl_lock_data data, void* /* userPtr */) 198 199 { 199 if ( Mutex* mutex = sharedResourceMutex(data))200 if (DeprecatedMutex* mutex = sharedResourceMutex(data)) 200 201 mutex->unlock(); 201 202 } -
trunk/Source/WebCore/platform/network/ios/QuickLook.mm
r183598 r187972 86 86 } 87 87 88 static Mutex& qlPreviewConverterDictionaryMutex()89 { 90 static NeverDestroyed< Mutex> mutex;88 static DeprecatedMutex& qlPreviewConverterDictionaryMutex() 89 { 90 static NeverDestroyed<DeprecatedMutex> mutex; 91 91 return mutex; 92 92 } … … 108 108 ASSERT(url); 109 109 ASSERT(converter); 110 MutexLocker lock(qlPreviewConverterDictionaryMutex());110 DeprecatedMutexLocker lock(qlPreviewConverterDictionaryMutex()); 111 111 [QLPreviewConverterDictionary() setObject:converter forKey:url]; 112 112 [QLContentDictionary() setObject:(fileName ? fileName : @"") forKey:url]; … … 122 122 id converter = nil; 123 123 { 124 MutexLocker lock(qlPreviewConverterDictionaryMutex());124 DeprecatedMutexLocker lock(qlPreviewConverterDictionaryMutex()); 125 125 converter = [QLPreviewConverterDictionary() objectForKey:url]; 126 126 } … … 132 132 void WebCore::removeQLPreviewConverterForURL(NSURL *url) 133 133 { 134 MutexLocker lock(qlPreviewConverterDictionaryMutex());134 DeprecatedMutexLocker lock(qlPreviewConverterDictionaryMutex()); 135 135 [QLPreviewConverterDictionary() removeObjectForKey:url]; 136 136 … … 167 167 NSURL *nsDocumentURL = documentURL; 168 168 { 169 MutexLocker lock(qlPreviewConverterDictionaryMutex());169 DeprecatedMutexLocker lock(qlPreviewConverterDictionaryMutex()); 170 170 converter = [QLPreviewConverterDictionary() objectForKey:nsDocumentURL]; 171 171 } -
trunk/Source/WebCore/platform/sql/SQLiteDatabase.cpp
r185018 r187972 122 122 sqlite3* db = m_db; 123 123 { 124 MutexLocker locker(m_databaseClosingMutex);124 DeprecatedMutexLocker locker(m_databaseClosingMutex); 125 125 m_db = 0; 126 126 } … … 153 153 m_interrupted = true; 154 154 while (!m_lockingMutex.tryLock()) { 155 MutexLocker locker(m_databaseClosingMutex);155 DeprecatedMutexLocker locker(m_databaseClosingMutex); 156 156 if (!m_db) 157 157 return; … … 182 182 183 183 { 184 MutexLocker locker(m_authorizerLock);184 DeprecatedMutexLocker locker(m_authorizerLock); 185 185 enableAuthorizer(false); 186 186 SQLiteStatement statement(*this, ASCIILiteral("PRAGMA max_page_count")); … … 202 202 int64_t newMaxPageCount = currentPageSize ? size / currentPageSize : 0; 203 203 204 MutexLocker locker(m_authorizerLock);204 DeprecatedMutexLocker locker(m_authorizerLock); 205 205 enableAuthorizer(false); 206 206 … … 219 219 // we can cache the value for future use 220 220 if (m_pageSize == -1) { 221 MutexLocker locker(m_authorizerLock);221 DeprecatedMutexLocker locker(m_authorizerLock); 222 222 enableAuthorizer(false); 223 223 … … 236 236 237 237 { 238 MutexLocker locker(m_authorizerLock);238 DeprecatedMutexLocker locker(m_authorizerLock); 239 239 enableAuthorizer(false); 240 240 // Note: freelist_count was added in SQLite 3.4.1. … … 252 252 253 253 { 254 MutexLocker locker(m_authorizerLock);254 DeprecatedMutexLocker locker(m_authorizerLock); 255 255 enableAuthorizer(false); 256 256 SQLiteStatement statement(*this, ASCIILiteral("PRAGMA page_count")); … … 331 331 int SQLiteDatabase::runIncrementalVacuumCommand() 332 332 { 333 MutexLocker locker(m_authorizerLock);333 DeprecatedMutexLocker locker(m_authorizerLock); 334 334 enableAuthorizer(false); 335 335 … … 472 472 } 473 473 474 MutexLocker locker(m_authorizerLock);474 DeprecatedMutexLocker locker(m_authorizerLock); 475 475 476 476 m_authorizer = auth; -
trunk/Source/WebCore/platform/sql/SQLiteDatabase.h
r185003 r187972 109 109 void setAuthorizer(PassRefPtr<DatabaseAuthorizer>); 110 110 111 Mutex& databaseMutex() { return m_lockingMutex; }111 DeprecatedMutex& databaseMutex() { return m_lockingMutex; } 112 112 bool isAutoCommitOn() const; 113 113 … … 150 150 bool m_sharable; 151 151 152 Mutex m_authorizerLock;152 DeprecatedMutex m_authorizerLock; 153 153 RefPtr<DatabaseAuthorizer> m_authorizer; 154 154 155 Mutex m_lockingMutex;155 DeprecatedMutex m_lockingMutex; 156 156 ThreadIdentifier m_openingThread; 157 157 158 Mutex m_databaseClosingMutex;158 DeprecatedMutex m_databaseClosingMutex; 159 159 bool m_interrupted; 160 160 -
trunk/Source/WebCore/platform/sql/SQLiteStatement.cpp
r182365 r187972 60 60 ASSERT(!m_isPrepared); 61 61 62 MutexLocker databaseLock(m_database.databaseMutex());62 DeprecatedMutexLocker databaseLock(m_database.databaseMutex()); 63 63 if (m_database.isInterrupted()) 64 64 return SQLITE_INTERRUPT; … … 89 89 int SQLiteStatement::step() 90 90 { 91 MutexLocker databaseLock(m_database.databaseMutex());91 DeprecatedMutexLocker databaseLock(m_database.databaseMutex()); 92 92 if (m_database.isInterrupted()) 93 93 return SQLITE_INTERRUPT; -
trunk/Source/WebCore/workers/WorkerThread.cpp
r186279 r187972 123 123 { 124 124 // Mutex protection is necessary to ensure that m_threadID is initialized when the thread starts. 125 MutexLocker lock(m_threadCreationMutex);125 DeprecatedMutexLocker lock(m_threadCreationMutex); 126 126 127 127 if (m_threadID) … … 146 146 147 147 { 148 MutexLocker lock(m_threadCreationMutex);148 DeprecatedMutexLocker lock(m_threadCreationMutex); 149 149 m_workerGlobalScope = createWorkerGlobalScope(m_startupData->m_scriptURL, m_startupData->m_userAgent, m_startupData->m_contentSecurityPolicy, m_startupData->m_contentSecurityPolicyType, m_startupData->m_topOrigin.release()); 150 150 … … 190 190 { 191 191 // Mutex protection is necessary because stop() can be called before the context is fully created. 192 MutexLocker lock(m_threadCreationMutex);192 DeprecatedMutexLocker lock(m_threadCreationMutex); 193 193 194 194 // Ensure that tasks are being handled by thread event loop. If script execution weren't forbidden, a while(1) loop in JS could keep the thread alive forever. -
trunk/Source/WebCore/workers/WorkerThread.h
r177857 r187972 90 90 91 91 RefPtr<WorkerGlobalScope> m_workerGlobalScope; 92 Mutex m_threadCreationMutex;92 DeprecatedMutex m_threadCreationMutex; 93 93 94 94 std::unique_ptr<WorkerThreadStartupData> m_startupData; -
trunk/Source/WebKit/ChangeLog
r187866 r187972 1 2015-08-04 Filip Pizlo <[email protected]> 2 3 Rename Mutex to DeprecatedMutex 4 https://bugs.webkit.org/show_bug.cgi?id=147675 5 6 Reviewed by Geoffrey Garen. 7 8 * Storage/StorageAreaSync.cpp: 9 (WebCore::StorageAreaSync::syncTimerFired): 10 (WebCore::StorageAreaSync::markImported): 11 (WebCore::StorageAreaSync::blockUntilImportComplete): 12 (WebCore::StorageAreaSync::performSync): 13 * Storage/StorageAreaSync.h: 14 * Storage/StorageTracker.cpp: 15 (WebCore::StorageTracker::setDatabaseDirectoryPath): 16 (WebCore::StorageTracker::finishedImportingOriginIdentifiers): 17 (WebCore::StorageTracker::syncImportOriginIdentifiers): 18 (WebCore::StorageTracker::syncFileSystemAndTrackerDatabase): 19 (WebCore::StorageTracker::setOriginDetails): 20 (WebCore::StorageTracker::syncSetOriginDetails): 21 (WebCore::StorageTracker::origins): 22 (WebCore::StorageTracker::deleteAllOrigins): 23 (WebCore::StorageTracker::syncDeleteAllOrigins): 24 (WebCore::StorageTracker::deleteOrigin): 25 (WebCore::StorageTracker::syncDeleteOrigin): 26 (WebCore::StorageTracker::canDeleteOrigin): 27 (WebCore::StorageTracker::cancelDeletingOrigin): 28 (WebCore::StorageTracker::diskUsageForOrigin): 29 * Storage/StorageTracker.h: 30 1 31 2015-08-04 Alex Christensen <[email protected]> 2 32 -
trunk/Source/WebKit/Storage/StorageAreaSync.cpp
r186279 r187972 165 165 bool partialSync = false; 166 166 { 167 MutexLocker locker(m_syncLock);167 DeprecatedMutexLocker locker(m_syncLock); 168 168 169 169 // Do not schedule another sync if we're still trying to complete the … … 353 353 void StorageAreaSync::markImported() 354 354 { 355 MutexLocker locker(m_importLock);355 DeprecatedMutexLocker locker(m_importLock); 356 356 m_importComplete = true; 357 357 m_importCondition.signal(); … … 373 373 return; 374 374 375 MutexLocker locker(m_importLock);375 DeprecatedMutexLocker locker(m_importLock); 376 376 while (!m_importComplete) 377 377 m_importCondition.wait(m_importLock); … … 468 468 HashMap<String, String> items; 469 469 { 470 MutexLocker locker(m_syncLock);470 DeprecatedMutexLocker locker(m_syncLock); 471 471 472 472 ASSERT(m_syncScheduled); … … 483 483 484 484 { 485 MutexLocker locker(m_syncLock);485 DeprecatedMutexLocker locker(m_syncLock); 486 486 m_syncInProgress = false; 487 487 } -
trunk/Source/WebKit/Storage/StorageAreaSync.h
r177813 r187972 86 86 const String m_databaseIdentifier; 87 87 88 Mutex m_syncLock;88 DeprecatedMutex m_syncLock; 89 89 HashMap<String, String> m_itemsPendingSync; 90 90 bool m_clearItemsWhileSyncing; … … 95 95 bool m_syncCloseDatabase; 96 96 97 mutable Mutex m_importLock;97 mutable DeprecatedMutex m_importLock; 98 98 ThreadCondition m_importCondition; 99 99 bool m_importComplete; -
trunk/Source/WebKit/Storage/StorageTracker.cpp
r182365 r187972 101 101 void StorageTracker::setDatabaseDirectoryPath(const String& path) 102 102 { 103 MutexLocker locker(m_databaseMutex);103 DeprecatedMutexLocker locker(m_databaseMutex); 104 104 105 105 if (m_database.isOpen()) … … 109 109 110 110 { 111 MutexLocker locker(m_originSetMutex);111 DeprecatedMutexLocker locker(m_originSetMutex); 112 112 m_originSet.clear(); 113 113 } … … 186 186 void StorageTracker::finishedImportingOriginIdentifiers() 187 187 { 188 MutexLocker locker(m_databaseMutex);188 DeprecatedMutexLocker locker(m_databaseMutex); 189 189 if (m_client) 190 190 m_client->didFinishLoadingOrigins(); … … 198 198 199 199 { 200 MutexLocker locker(m_databaseMutex);200 DeprecatedMutexLocker locker(m_databaseMutex); 201 201 202 202 // Don't force creation of StorageTracker's db just because a tracker … … 218 218 219 219 { 220 MutexLocker lockOrigins(m_originSetMutex);220 DeprecatedMutexLocker lockOrigins(m_originSetMutex); 221 221 while ((result = statement.step()) == SQLITE_ROW) 222 222 m_originSet.add(statement.getColumnText(0).isolatedCopy()); … … 233 233 234 234 { 235 MutexLocker locker(m_clientMutex);235 DeprecatedMutexLocker locker(m_clientMutex); 236 236 237 237 if (m_client) { 238 MutexLocker locker(m_originSetMutex);238 DeprecatedMutexLocker locker(m_originSetMutex); 239 239 OriginSet::const_iterator end = m_originSet.end(); 240 240 for (OriginSet::const_iterator it = m_originSet.begin(); it != end; ++it) … … 258 258 Vector<String> paths; 259 259 { 260 MutexLocker locker(m_databaseMutex);260 DeprecatedMutexLocker locker(m_databaseMutex); 261 261 paths = listDirectory(m_storageDirectoryPath, "*.localstorage"); 262 262 } … … 266 266 OriginSet originSetCopy; 267 267 { 268 MutexLocker locker(m_originSetMutex);268 DeprecatedMutexLocker locker(m_originSetMutex); 269 269 for (OriginSet::const_iterator it = m_originSet.begin(), end = m_originSet.end(); it != end; ++it) 270 270 originSetCopy.add((*it).isolatedCopy()); … … 307 307 308 308 { 309 MutexLocker locker(m_originSetMutex);309 DeprecatedMutexLocker locker(m_originSetMutex); 310 310 311 311 if (m_originSet.contains(originIdentifier)) … … 338 338 SQLiteTransactionInProgressAutoCounter transactionCounter; 339 339 340 MutexLocker locker(m_databaseMutex);340 DeprecatedMutexLocker locker(m_databaseMutex); 341 341 342 342 openTrackerDatabase(true); … … 358 358 359 359 { 360 MutexLocker locker(m_originSetMutex);360 DeprecatedMutexLocker locker(m_originSetMutex); 361 361 if (!m_originSet.contains(originIdentifier)) 362 362 m_originSet.add(originIdentifier); … … 364 364 365 365 { 366 MutexLocker locker(m_clientMutex);366 DeprecatedMutexLocker locker(m_clientMutex); 367 367 if (m_client) 368 368 m_client->dispatchDidModifyOrigin(originIdentifier); … … 377 377 return; 378 378 379 MutexLocker locker(m_originSetMutex);379 DeprecatedMutexLocker locker(m_originSetMutex); 380 380 381 381 for (OriginSet::const_iterator it = m_originSet.begin(), end = m_originSet.end(); it != end; ++it) … … 393 393 394 394 { 395 MutexLocker locker(m_originSetMutex);395 DeprecatedMutexLocker locker(m_originSetMutex); 396 396 willDeleteAllOrigins(); 397 397 m_originSet.clear(); … … 418 418 SQLiteTransactionInProgressAutoCounter transactionCounter; 419 419 420 MutexLocker locker(m_databaseMutex);420 DeprecatedMutexLocker locker(m_databaseMutex); 421 421 422 422 openTrackerDatabase(false); … … 438 438 439 439 { 440 MutexLocker locker(m_clientMutex);440 DeprecatedMutexLocker locker(m_clientMutex); 441 441 if (m_client) 442 442 m_client->dispatchDidModifyOrigin(statement.getColumnText(0)); … … 500 500 501 501 { 502 MutexLocker locker(m_originSetMutex);502 DeprecatedMutexLocker locker(m_originSetMutex); 503 503 willDeleteOrigin(originId); 504 504 m_originSet.remove(originId); … … 517 517 SQLiteTransactionInProgressAutoCounter transactionCounter; 518 518 519 MutexLocker locker(m_databaseMutex);519 DeprecatedMutexLocker locker(m_databaseMutex); 520 520 521 521 if (!canDeleteOrigin(originIdentifier)) { … … 550 550 bool shouldDeleteTrackerFiles = false; 551 551 { 552 MutexLocker locker(m_originSetMutex);552 DeprecatedMutexLocker locker(m_originSetMutex); 553 553 m_originSet.remove(originIdentifier); 554 554 shouldDeleteTrackerFiles = m_originSet.isEmpty(); … … 567 567 568 568 { 569 MutexLocker locker(m_clientMutex);569 DeprecatedMutexLocker locker(m_clientMutex); 570 570 if (m_client) 571 571 m_client->dispatchDidModifyOrigin(originIdentifier); … … 593 593 { 594 594 ASSERT(!m_databaseMutex.tryLock()); 595 MutexLocker locker(m_originSetMutex);595 DeprecatedMutexLocker locker(m_originSetMutex); 596 596 return m_originsBeingDeleted.contains(originIdentifier); 597 597 } … … 602 602 return; 603 603 604 MutexLocker locker(m_databaseMutex);605 { 606 MutexLocker locker(m_originSetMutex);604 DeprecatedMutexLocker locker(m_databaseMutex); 605 { 606 DeprecatedMutexLocker locker(m_originSetMutex); 607 607 if (!m_originsBeingDeleted.isEmpty()) 608 608 m_originsBeingDeleted.remove(originIdentifier); … … 648 648 return 0; 649 649 650 MutexLocker locker(m_databaseMutex);650 DeprecatedMutexLocker locker(m_databaseMutex); 651 651 652 652 String path = databasePathForOrigin(origin->databaseIdentifier()); -
trunk/Source/WebKit/Storage/StorageTracker.h
r177813 r187972 96 96 97 97 // Mutex for m_database and m_storageDirectoryPath. 98 Mutex m_databaseMutex;98 DeprecatedMutex m_databaseMutex; 99 99 SQLiteDatabase m_database; 100 100 String m_storageDirectoryPath; 101 101 102 Mutex m_clientMutex;102 DeprecatedMutex m_clientMutex; 103 103 StorageTrackerClient* m_client; 104 104 105 105 // Guard for m_originSet and m_originsBeingDeleted. 106 Mutex m_originSetMutex;106 DeprecatedMutex m_originSetMutex; 107 107 typedef HashSet<String> OriginSet; 108 108 OriginSet m_originSet; -
trunk/Source/WebKit/ios/ChangeLog
r187926 r187972 1 2015-08-04 Filip Pizlo <[email protected]> 2 3 Rename Mutex to DeprecatedMutex 4 https://bugs.webkit.org/show_bug.cgi?id=147675 5 6 Reviewed by Geoffrey Garen. 7 8 * WebCoreSupport/WebFixedPositionContent.mm: 9 (WebFixedPositionContentDataLock): 10 (-[WebFixedPositionContent scrollOrZoomChanged:]): 11 (-[WebFixedPositionContent overflowScrollPositionForLayer:changedTo:]): 12 (-[WebFixedPositionContent setViewportConstrainedLayers:stickyContainerMap:]): 13 (-[WebFixedPositionContent hasFixedOrStickyPositionLayers]): 14 (-[WebFixedPositionContent minimumOffsetFromFixedPositionLayersToAnchorEdge:ofRect:inLayer:]): 15 1 16 2015-08-04 Anders Carlsson <[email protected]> 2 17 -
trunk/Source/WebKit/ios/WebCoreSupport/WebFixedPositionContent.mm
r176140 r187972 49 49 using namespace std; 50 50 51 static Mutex& WebFixedPositionContentDataLock()52 { 53 DEPRECATED_DEFINE_STATIC_LOCAL( Mutex, mutex, ());51 static DeprecatedMutex& WebFixedPositionContentDataLock() 52 { 53 DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, mutex, ()); 54 54 return mutex; 55 55 } … … 102 102 - (void)scrollOrZoomChanged:(CGRect)positionedObjectsRect 103 103 { 104 MutexLocker lock(WebFixedPositionContentDataLock());104 DeprecatedMutexLocker lock(WebFixedPositionContentDataLock()); 105 105 106 106 LayerInfoMap::const_iterator end = _private->m_viewportConstrainedLayers.end(); … … 141 141 - (void)overflowScrollPositionForLayer:(CALayer *)scrollLayer changedTo:(CGPoint)scrollPosition 142 142 { 143 MutexLocker lock(WebFixedPositionContentDataLock());143 DeprecatedMutexLocker lock(WebFixedPositionContentDataLock()); 144 144 145 145 LayerInfoMap::const_iterator end = _private->m_viewportConstrainedLayers.end(); … … 174 174 - (void)setViewportConstrainedLayers:(WTF::HashMap<CALayer *, std::unique_ptr<WebCore::ViewportConstraints>>&)layerMap stickyContainerMap:(WTF::HashMap<CALayer*, CALayer*>&)stickyContainers 175 175 { 176 MutexLocker lock(WebFixedPositionContentDataLock());176 DeprecatedMutexLocker lock(WebFixedPositionContentDataLock()); 177 177 178 178 _private->m_viewportConstrainedLayers.clear(); … … 191 191 - (BOOL)hasFixedOrStickyPositionLayers 192 192 { 193 MutexLocker lock(WebFixedPositionContentDataLock());193 DeprecatedMutexLocker lock(WebFixedPositionContentDataLock()); 194 194 return !_private->m_viewportConstrainedLayers.isEmpty(); 195 195 } … … 211 211 - (CGFloat)minimumOffsetFromFixedPositionLayersToAnchorEdge:(WebFixedPositionAnchorEdge)anchorEdge ofRect:(CGRect)rect inLayer:(CALayer *)layer 212 212 { 213 MutexLocker lock(WebFixedPositionContentDataLock());213 DeprecatedMutexLocker lock(WebFixedPositionContentDataLock()); 214 214 ViewportConstraints::AnchorEdgeFlags anchorEdgeFlags = anchorEdgeFlagsForAnchorEdge(anchorEdge); 215 215 CGFloat minimumOffset = CGFLOAT_MAX; -
trunk/Source/WebKit/mac/ChangeLog
r187926 r187972 1 2015-08-04 Filip Pizlo <[email protected]> 2 3 Rename Mutex to DeprecatedMutex 4 https://bugs.webkit.org/show_bug.cgi?id=147675 5 6 Reviewed by Geoffrey Garen. 7 8 * Storage/WebDatabaseManager.mm: 9 (transactionBackgroundTaskIdentifierLock): 10 (+[WebDatabaseManager startBackgroundTask]): 11 (+[WebDatabaseManager endBackgroundTask]): 12 * WebView/WebView.mm: 13 (-[WebView _synchronizeCustomFixedPositionLayoutRect]): 14 (-[WebView _setCustomFixedPositionLayoutRectInWebThread:synchronize:]): 15 (-[WebView _setCustomFixedPositionLayoutRect:]): 16 (-[WebView _fetchCustomFixedPositionLayoutRect:]): 17 * WebView/WebViewData.h: 18 1 19 2015-08-04 Anders Carlsson <[email protected]> 2 20 -
trunk/Source/WebKit/mac/Storage/WebDatabaseManager.mm
r187926 r187972 227 227 @implementation WebDatabaseManager (WebDatabaseManagerInternal) 228 228 229 static Mutex& transactionBackgroundTaskIdentifierLock()230 { 231 DEPRECATED_DEFINE_STATIC_LOCAL( Mutex, mutex, ());229 static DeprecatedMutex& transactionBackgroundTaskIdentifierLock() 230 { 231 DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, mutex, ()); 232 232 return mutex; 233 233 } … … 262 262 + (void)startBackgroundTask 263 263 { 264 MutexLocker lock(transactionBackgroundTaskIdentifierLock());264 DeprecatedMutexLocker lock(transactionBackgroundTaskIdentifierLock()); 265 265 266 266 // If there's already an existing background task going on, there's no need to start a new one. … … 276 276 + (void)endBackgroundTask 277 277 { 278 MutexLocker lock(transactionBackgroundTaskIdentifierLock());278 DeprecatedMutexLocker lock(transactionBackgroundTaskIdentifierLock()); 279 279 280 280 // It is possible that we were unable to start the background task when the first transaction began. -
trunk/Source/WebKit/mac/WebView/WebView.mm
r186982 r187972 3633 3633 IntRect newRect; 3634 3634 { 3635 MutexLocker locker(_private->pendingFixedPositionLayoutRectMutex);3635 DeprecatedMutexLocker locker(_private->pendingFixedPositionLayoutRectMutex); 3636 3636 if (CGRectIsNull(_private->pendingFixedPositionLayoutRect)) 3637 3637 return; … … 3647 3647 { 3648 3648 { 3649 MutexLocker locker(_private->pendingFixedPositionLayoutRectMutex);3649 DeprecatedMutexLocker locker(_private->pendingFixedPositionLayoutRectMutex); 3650 3650 _private->pendingFixedPositionLayoutRect = rect; 3651 3651 } … … 3661 3661 ASSERT(WebThreadIsLocked()); 3662 3662 { 3663 MutexLocker locker(_private->pendingFixedPositionLayoutRectMutex);3663 DeprecatedMutexLocker locker(_private->pendingFixedPositionLayoutRectMutex); 3664 3664 _private->pendingFixedPositionLayoutRect = rect; 3665 3665 } … … 3669 3669 - (BOOL)_fetchCustomFixedPositionLayoutRect:(NSRect*)rect 3670 3670 { 3671 MutexLocker locker(_private->pendingFixedPositionLayoutRectMutex);3671 DeprecatedMutexLocker locker(_private->pendingFixedPositionLayoutRectMutex); 3672 3672 if (CGRectIsNull(_private->pendingFixedPositionLayoutRect)) 3673 3673 return false; -
trunk/Source/WebKit/mac/WebView/WebViewData.h
r184780 r187972 250 250 BOOL mainViewIsScrollingOrZooming; 251 251 int32_t didDrawTiles; 252 WTF:: Mutex pendingFixedPositionLayoutRectMutex;252 WTF::DeprecatedMutex pendingFixedPositionLayoutRectMutex; 253 253 CGRect pendingFixedPositionLayoutRect; 254 254 #endif -
trunk/Source/WebKit/win/ChangeLog
r187908 r187972 1 2015-08-04 Filip Pizlo <[email protected]> 2 3 Rename Mutex to DeprecatedMutex 4 https://bugs.webkit.org/show_bug.cgi?id=147675 5 6 Reviewed by Geoffrey Garen. 7 8 * Plugins/PluginMainThreadScheduler.cpp: 9 (WebCore::PluginMainThreadScheduler::scheduleCall): 10 (WebCore::PluginMainThreadScheduler::registerPlugin): 11 (WebCore::PluginMainThreadScheduler::unregisterPlugin): 12 (WebCore::PluginMainThreadScheduler::dispatchCallsForPlugin): 13 * Plugins/PluginMainThreadScheduler.h: 14 * WebIconDatabase.cpp: 15 (WebIconDatabase::didRemoveAllIcons): 16 (WebIconDatabase::didImportIconURLForPageURL): 17 (WebIconDatabase::deliverNotifications): 18 * WebLocalizableStrings.cpp: 19 (mainBundleLocStrings): 20 (frameworkLocStringsMutex): 21 (findCachedString): 22 (cacheString): 23 1 24 2015-08-04 Brent Fulgham <[email protected]> 2 25 -
trunk/Source/WebKit/win/Plugins/PluginMainThreadScheduler.cpp
r185926 r187972 43 43 void PluginMainThreadScheduler::scheduleCall(NPP npp, MainThreadFunction function, void* userData) 44 44 { 45 MutexLocker lock(m_queueMutex);45 DeprecatedMutexLocker lock(m_queueMutex); 46 46 47 47 CallQueueMap::iterator it = m_callQueueMap.find(npp); … … 59 59 void PluginMainThreadScheduler::registerPlugin(NPP npp) 60 60 { 61 MutexLocker lock(m_queueMutex);61 DeprecatedMutexLocker lock(m_queueMutex); 62 62 63 63 ASSERT(!m_callQueueMap.contains(npp)); … … 67 67 void PluginMainThreadScheduler::unregisterPlugin(NPP npp) 68 68 { 69 MutexLocker lock(m_queueMutex);69 DeprecatedMutexLocker lock(m_queueMutex); 70 70 71 71 ASSERT(m_callQueueMap.contains(npp)); … … 78 78 // Check if the plug-in has been destroyed. 79 79 { 80 MutexLocker lock(m_queueMutex);80 DeprecatedMutexLocker lock(m_queueMutex); 81 81 if (!m_callQueueMap.contains(npp)) 82 82 return; -
trunk/Source/WebKit/win/Plugins/PluginMainThreadScheduler.h
r185926 r187972 80 80 bool m_callPending; 81 81 CallQueueMap m_callQueueMap; 82 Mutex m_queueMutex;82 DeprecatedMutex m_queueMutex; 83 83 }; 84 84 -
trunk/Source/WebKit/win/WebIconDatabase.cpp
r176892 r187972 321 321 { 322 322 // Queueing the empty string is a special way of saying "this queued notification is the didRemoveAllIcons notification" 323 MutexLocker locker(m_notificationMutex);323 DeprecatedMutexLocker locker(m_notificationMutex); 324 324 m_notificationQueue.append(String()); 325 325 scheduleNotificationDelivery(); … … 328 328 void WebIconDatabase::didImportIconURLForPageURL(const WTF::String& pageURL) 329 329 { 330 MutexLocker locker(m_notificationMutex);330 DeprecatedMutexLocker locker(m_notificationMutex); 331 331 m_notificationQueue.append(pageURL.isolatedCopy()); 332 332 scheduleNotificationDelivery(); … … 404 404 Vector<String> queue; 405 405 { 406 MutexLocker locker(m_sharedWebIconDatabase->m_notificationMutex);406 DeprecatedMutexLocker locker(m_sharedWebIconDatabase->m_notificationMutex); 407 407 queue.swap(m_sharedWebIconDatabase->m_notificationQueue); 408 408 m_sharedWebIconDatabase->m_deliveryRequested = false; -
trunk/Source/WebKit/win/WebLocalizableStrings.cpp
r176892 r187972 45 45 typedef HashMap<String, LocalizedString*> LocalizedStringMap; 46 46 47 static Mutex& mainBundleLocStringsMutex()48 { 49 DEPRECATED_DEFINE_STATIC_LOCAL( Mutex, mutex, ());47 static DeprecatedMutex& mainBundleLocStringsMutex() 48 { 49 DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, mutex, ()); 50 50 return mutex; 51 51 } … … 57 57 } 58 58 59 static Mutex& frameworkLocStringsMutex()60 { 61 DEPRECATED_DEFINE_STATIC_LOCAL( Mutex, mutex, ());59 static DeprecatedMutex& frameworkLocStringsMutex() 60 { 61 DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, mutex, ()); 62 62 return mutex; 63 63 } … … 176 176 { 177 177 if (!stringsBundle) { 178 MutexLocker lock(mainBundleLocStringsMutex());178 DeprecatedMutexLocker lock(mainBundleLocStringsMutex()); 179 179 return mainBundleLocStrings().get(key); 180 180 } 181 181 182 182 if (stringsBundle->bundle == WebKitLocalizableStringsBundle.bundle) { 183 MutexLocker lock(frameworkLocStringsMutex());183 DeprecatedMutexLocker lock(frameworkLocStringsMutex()); 184 184 return frameworkLocStrings().get(key); 185 185 } … … 191 191 { 192 192 if (!stringsBundle) { 193 MutexLocker lock(mainBundleLocStringsMutex());193 DeprecatedMutexLocker lock(mainBundleLocStringsMutex()); 194 194 mainBundleLocStrings().set(key, value); 195 195 return; 196 196 } 197 197 198 MutexLocker lock(frameworkLocStringsMutex());198 DeprecatedMutexLocker lock(frameworkLocStringsMutex()); 199 199 frameworkLocStrings().set(key, value); 200 200 } -
trunk/Source/WebKit2/ChangeLog
r187962 r187972 1 2015-08-04 Filip Pizlo <[email protected]> 2 3 Rename Mutex to DeprecatedMutex 4 https://bugs.webkit.org/show_bug.cgi?id=147675 5 6 Reviewed by Geoffrey Garen. 7 8 * DatabaseProcess/DatabaseProcess.cpp: 9 (WebKit::DatabaseProcess::postDatabaseTask): 10 (WebKit::DatabaseProcess::performNextDatabaseTask): 11 * DatabaseProcess/DatabaseProcess.h: 12 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp: 13 (WebKit::UniqueIDBDatabase::shutdown): 14 (WebKit::UniqueIDBDatabase::postMainThreadTask): 15 (WebKit::UniqueIDBDatabase::performNextMainThreadTask): 16 (WebKit::UniqueIDBDatabase::postDatabaseTask): 17 (WebKit::UniqueIDBDatabase::performNextDatabaseTask): 18 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h: 19 * Platform/IPC/Connection.cpp: 20 (IPC::Connection::sendSyncMessage): 21 (IPC::Connection::sendSyncMessageFromSecondaryThread): 22 (IPC::Connection::waitForSyncReply): 23 (IPC::Connection::processIncomingSyncReply): 24 (IPC::Connection::connectionDidClose): 25 * Platform/IPC/Connection.h: 26 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: 27 (WebKit::CoordinatedGraphicsScene::appendUpdate): 28 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h: 29 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: 30 (WebKit::ThreadedCompositor::createCompositingThread): 31 (WebKit::ThreadedCompositor::runCompositingThread): 32 (WebKit::ThreadedCompositor::terminateCompositingThread): 33 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h: 34 * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm: 35 (WebKit::CustomProtocolManager::addCustomProtocol): 36 (WebKit::CustomProtocolManager::removeCustomProtocol): 37 (WebKit::CustomProtocolManager::registerScheme): 38 (WebKit::CustomProtocolManager::unregisterScheme): 39 (WebKit::CustomProtocolManager::supportsScheme): 40 (WebKit::CustomProtocolManager::protocolForID): 41 * Shared/Network/CustomProtocols/CustomProtocolManager.h: 42 * Shared/linux/SeccompFilters/SeccompBroker.cpp: 43 * WebProcess/Plugins/PluginProcessConnectionManager.cpp: 44 (WebKit::PluginProcessConnectionManager::getPluginProcessConnection): 45 (WebKit::PluginProcessConnectionManager::removePluginProcessConnection): 46 (WebKit::PluginProcessConnectionManager::pluginProcessCrashed): 47 * WebProcess/Plugins/PluginProcessConnectionManager.h: 48 * WebProcess/WebPage/EventDispatcher.cpp: 49 (WebKit::EventDispatcher::addScrollingTreeForPage): 50 (WebKit::EventDispatcher::removeScrollingTreeForPage): 51 (WebKit::EventDispatcher::wheelEvent): 52 * WebProcess/WebPage/EventDispatcher.h: 53 * WebProcess/soup/WebKitSoupRequestInputStream.cpp: 54 (webkitSoupRequestInputStreamReadAsync): 55 (webkitSoupRequestInputStreamAddData): 56 1 57 2015-08-05 Daniel Bates <[email protected]> 2 58 -
trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp
r187002 r187972 152 152 ASSERT(RunLoop::isMain()); 153 153 154 MutexLocker locker(m_databaseTaskMutex);154 DeprecatedMutexLocker locker(m_databaseTaskMutex); 155 155 156 156 m_databaseTasks.append(WTF::move(task)); … … 167 167 std::unique_ptr<AsyncTask> task; 168 168 { 169 MutexLocker locker(m_databaseTaskMutex);169 DeprecatedMutexLocker locker(m_databaseTaskMutex); 170 170 ASSERT(!m_databaseTasks.isEmpty()); 171 171 task = m_databaseTasks.takeFirst(); -
trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.h
r187002 r187972 107 107 108 108 Deque<std::unique_ptr<AsyncTask>> m_databaseTasks; 109 Mutex m_databaseTaskMutex;109 DeprecatedMutex m_databaseTaskMutex; 110 110 }; 111 111 -
trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp
r186279 r187972 137 137 138 138 { 139 MutexLocker locker(m_databaseTaskMutex);139 DeprecatedMutexLocker locker(m_databaseTaskMutex); 140 140 m_databaseTasks.clear(); 141 141 } … … 1126 1126 return; 1127 1127 1128 MutexLocker locker(m_mainThreadTaskMutex);1128 DeprecatedMutexLocker locker(m_mainThreadTaskMutex); 1129 1129 1130 1130 m_mainThreadTasks.append(WTF::move(task)); … … 1144 1144 std::unique_ptr<AsyncTask> task; 1145 1145 { 1146 MutexLocker locker(m_mainThreadTaskMutex);1146 DeprecatedMutexLocker locker(m_mainThreadTaskMutex); 1147 1147 1148 1148 // This database might be shutting down, in which case the task queue might be empty. … … 1166 1166 return; 1167 1167 1168 MutexLocker locker(m_databaseTaskMutex);1168 DeprecatedMutexLocker locker(m_databaseTaskMutex); 1169 1169 1170 1170 m_databaseTasks.append(WTF::move(task)); … … 1187 1187 std::unique_ptr<AsyncTask> task; 1188 1188 { 1189 MutexLocker locker(m_databaseTaskMutex);1189 DeprecatedMutexLocker locker(m_databaseTaskMutex); 1190 1190 1191 1191 // This database might be shutting down on the main thread, in which case the task queue might be empty. -
trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h
r185637 r187972 211 211 212 212 Deque<std::unique_ptr<AsyncTask>> m_databaseTasks; 213 Mutex m_databaseTaskMutex;213 DeprecatedMutex m_databaseTaskMutex; 214 214 215 215 Deque<std::unique_ptr<AsyncTask>> m_mainThreadTasks; 216 Mutex m_mainThreadTaskMutex;216 DeprecatedMutex m_mainThreadTaskMutex; 217 217 }; 218 218 -
trunk/Source/WebKit2/Platform/IPC/Connection.cpp
r186714 r187972 460 460 // Push the pending sync reply information on our stack. 461 461 { 462 MutexLocker locker(m_syncReplyStateMutex);462 DeprecatedMutexLocker locker(m_syncReplyStateMutex); 463 463 if (!m_shouldWaitForSyncReplies) { 464 464 didFailToSendSyncMessage(); … … 487 487 // Finally, pop the pending sync reply information. 488 488 { 489 MutexLocker locker(m_syncReplyStateMutex);489 DeprecatedMutexLocker locker(m_syncReplyStateMutex); 490 490 ASSERT(m_pendingSyncReplies.last().syncRequestID == syncRequestID); 491 491 m_pendingSyncReplies.removeLast(); … … 509 509 // Push the pending sync reply information on our stack. 510 510 { 511 MutexLocker locker(m_syncReplyStateMutex);511 DeprecatedMutexLocker locker(m_syncReplyStateMutex); 512 512 if (!m_shouldWaitForSyncReplies) 513 513 return nullptr; … … 527 527 // Finally, pop the pending sync reply information. 528 528 { 529 MutexLocker locker(m_syncReplyStateMutex);529 DeprecatedMutexLocker locker(m_syncReplyStateMutex); 530 530 ASSERT(m_secondaryThreadPendingSyncReplyMap.contains(syncRequestID)); 531 531 m_secondaryThreadPendingSyncReplyMap.remove(syncRequestID); … … 547 547 548 548 { 549 MutexLocker locker(m_syncReplyStateMutex);549 DeprecatedMutexLocker locker(m_syncReplyStateMutex); 550 550 551 551 // Second, check if there is a sync reply at the top of the stack. … … 593 593 void Connection::processIncomingSyncReply(std::unique_ptr<MessageDecoder> decoder) 594 594 { 595 MutexLocker locker(m_syncReplyStateMutex);595 DeprecatedMutexLocker locker(m_syncReplyStateMutex); 596 596 597 597 // Go through the stack of sync requests that have pending replies and see which one … … 751 751 752 752 { 753 MutexLocker locker(m_syncReplyStateMutex);753 DeprecatedMutexLocker locker(m_syncReplyStateMutex); 754 754 755 755 ASSERT(m_shouldWaitForSyncReplies); -
trunk/Source/WebKit2/Platform/IPC/Connection.h
r186662 r187972 299 299 friend class SyncMessageState; 300 300 301 Mutex m_syncReplyStateMutex;301 DeprecatedMutex m_syncReplyStateMutex; 302 302 bool m_shouldWaitForSyncReplies; 303 303 Vector<PendingSyncReply> m_pendingSyncReplies; -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp
r183910 r187972 691 691 692 692 ASSERT(isMainThread()); 693 MutexLocker locker(m_renderQueueMutex);693 DeprecatedMutexLocker locker(m_renderQueueMutex); 694 694 m_renderQueue.append(WTF::move(function)); 695 695 } -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h
r178182 r187972 146 146 // Render queue can be accessed ony from main thread or updatePaintNode call stack! 147 147 Vector<std::function<void()>> m_renderQueue; 148 Mutex m_renderQueueMutex;148 DeprecatedMutex m_renderQueueMutex; 149 149 150 150 std::unique_ptr<WebCore::TextureMapper> m_textureMapper; -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp
r187416 r187972 296 296 return; 297 297 298 MutexLocker locker(m_initializeRunLoopConditionMutex);298 DeprecatedMutexLocker locker(m_initializeRunLoopConditionMutex); 299 299 m_threadIdentifier = createThread(compositingThreadEntry, this, "WebCore: ThreadedCompositor"); 300 300 … … 305 305 { 306 306 { 307 MutexLocker locker(m_initializeRunLoopConditionMutex);307 DeprecatedMutexLocker locker(m_initializeRunLoopConditionMutex); 308 308 309 309 m_compositingRunLoop = std::make_unique<CompositingRunLoop>([&] { … … 322 322 323 323 { 324 MutexLocker locker(m_terminateRunLoopConditionMutex);324 DeprecatedMutexLocker locker(m_terminateRunLoopConditionMutex); 325 325 m_compositingRunLoop = nullptr; 326 326 m_context = nullptr; … … 333 333 void ThreadedCompositor::terminateCompositingThread() 334 334 { 335 MutexLocker locker(m_terminateRunLoopConditionMutex);335 DeprecatedMutexLocker locker(m_terminateRunLoopConditionMutex); 336 336 337 337 m_scene->detach(); -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h
r186059 r187972 112 112 ThreadIdentifier m_threadIdentifier; 113 113 ThreadCondition m_initializeRunLoopCondition; 114 Mutex m_initializeRunLoopConditionMutex;114 DeprecatedMutex m_initializeRunLoopConditionMutex; 115 115 ThreadCondition m_terminateRunLoopCondition; 116 Mutex m_terminateRunLoopConditionMutex;116 DeprecatedMutex m_terminateRunLoopConditionMutex; 117 117 }; 118 118 -
trunk/Source/WebKit2/Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm
r187609 r187972 166 166 { 167 167 ASSERT(customProtocol); 168 MutexLocker locker(m_customProtocolMapMutex);168 DeprecatedMutexLocker locker(m_customProtocolMapMutex); 169 169 m_customProtocolMap.add(customProtocol.customProtocolID, customProtocol); 170 170 } … … 173 173 { 174 174 ASSERT(customProtocol); 175 MutexLocker locker(m_customProtocolMapMutex);175 DeprecatedMutexLocker locker(m_customProtocolMapMutex); 176 176 m_customProtocolMap.remove(customProtocol.customProtocolID); 177 177 } … … 180 180 { 181 181 ASSERT(!scheme.isNull()); 182 MutexLocker locker(m_registeredSchemesMutex);182 DeprecatedMutexLocker locker(m_registeredSchemesMutex); 183 183 m_registeredSchemes.add(scheme); 184 184 } … … 187 187 { 188 188 ASSERT(!scheme.isNull()); 189 MutexLocker locker(m_registeredSchemesMutex);189 DeprecatedMutexLocker locker(m_registeredSchemesMutex); 190 190 m_registeredSchemes.remove(scheme); 191 191 } … … 196 196 return false; 197 197 198 MutexLocker locker(m_registeredSchemesMutex);198 DeprecatedMutexLocker locker(m_registeredSchemesMutex); 199 199 return m_registeredSchemes.contains(scheme); 200 200 } … … 262 262 RetainPtr<WKCustomProtocol> CustomProtocolManager::protocolForID(uint64_t customProtocolID) 263 263 { 264 MutexLocker locker(m_customProtocolMapMutex);264 DeprecatedMutexLocker locker(m_customProtocolMapMutex); 265 265 266 266 CustomProtocolMap::const_iterator it = m_customProtocolMap.find(customProtocolID); -
trunk/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h
r180410 r187972 101 101 #if PLATFORM(COCOA) 102 102 HashSet<String> m_registeredSchemes; 103 Mutex m_registeredSchemesMutex;103 DeprecatedMutex m_registeredSchemesMutex; 104 104 105 105 typedef HashMap<uint64_t, RetainPtr<WKCustomProtocol>> CustomProtocolMap; 106 106 CustomProtocolMap m_customProtocolMap; 107 Mutex m_customProtocolMapMutex;107 DeprecatedMutex m_customProtocolMapMutex; 108 108 109 109 // WKCustomProtocol objects can be removed from the m_customProtocolMap from multiple threads. -
trunk/Source/WebKit2/Shared/linux/SeccompFilters/SeccompBroker.cpp
r187455 r187972 66 66 int m_socket; 67 67 68 mutable Mutex m_socketLock;68 mutable DeprecatedMutex m_socketLock; 69 69 70 70 // Maps files that may be read by malloc() to open file descriptors. -
trunk/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp
r186566 r187972 87 87 88 88 { 89 MutexLocker locker(m_tokensAndConnectionsMutex);89 DeprecatedMutexLocker locker(m_tokensAndConnectionsMutex); 90 90 ASSERT(!m_tokensAndConnections.contains(pluginProcessToken)); 91 91 … … 102 102 103 103 { 104 MutexLocker locker(m_tokensAndConnectionsMutex);104 DeprecatedMutexLocker locker(m_tokensAndConnectionsMutex); 105 105 ASSERT(m_tokensAndConnections.contains(pluginProcessConnection->pluginProcessToken())); 106 106 … … 113 113 void PluginProcessConnectionManager::pluginProcessCrashed(uint64_t pluginProcessToken) 114 114 { 115 MutexLocker locker(m_tokensAndConnectionsMutex);115 DeprecatedMutexLocker locker(m_tokensAndConnectionsMutex); 116 116 IPC::Connection* connection = m_tokensAndConnections.get(pluginProcessToken); 117 117 -
trunk/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.h
r186566 r187972 65 65 Vector<RefPtr<PluginProcessConnection>> m_pluginProcessConnections; 66 66 67 Mutex m_tokensAndConnectionsMutex;67 DeprecatedMutex m_tokensAndConnectionsMutex; 68 68 HashMap<uint64_t, RefPtr<IPC::Connection>> m_tokensAndConnections; 69 69 }; -
trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp
r186566 r187972 66 66 void EventDispatcher::addScrollingTreeForPage(WebPage* webPage) 67 67 { 68 MutexLocker locker(m_scrollingTreesMutex);68 DeprecatedMutexLocker locker(m_scrollingTreesMutex); 69 69 70 70 ASSERT(webPage->corePage()->scrollingCoordinator()); … … 77 77 void EventDispatcher::removeScrollingTreeForPage(WebPage* webPage) 78 78 { 79 MutexLocker locker(m_scrollingTreesMutex);79 DeprecatedMutexLocker locker(m_scrollingTreesMutex); 80 80 ASSERT(m_scrollingTrees.contains(webPage->pageID())); 81 81 … … 133 133 134 134 #if ENABLE(ASYNC_SCROLLING) 135 MutexLocker locker(m_scrollingTreesMutex);135 DeprecatedMutexLocker locker(m_scrollingTreesMutex); 136 136 if (RefPtr<ThreadedScrollingTree> scrollingTree = m_scrollingTrees.get(pageID)) { 137 137 // FIXME: It's pretty horrible that we're updating the back/forward state here. -
trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.h
r186566 r187972 93 93 94 94 #if ENABLE(ASYNC_SCROLLING) 95 Mutex m_scrollingTreesMutex;95 DeprecatedMutex m_scrollingTreesMutex; 96 96 HashMap<uint64_t, RefPtr<WebCore::ThreadedScrollingTree>> m_scrollingTrees; 97 97 #endif -
trunk/Source/WebKit2/WebProcess/soup/WebKitSoupRequestInputStream.cpp
r185808 r187972 42 42 uint64_t bytesRead; 43 43 44 Mutex readLock;44 DeprecatedMutex readLock; 45 45 std::unique_ptr<AsyncReadData> pendingAsyncRead; 46 46 }; … … 85 85 GRefPtr<GTask> task = adoptGRef(g_task_new(stream, cancellable, callback, userData)); 86 86 87 MutexLocker locker(stream->priv->readLock);87 DeprecatedMutexLocker locker(stream->priv->readLock); 88 88 89 89 if (!webkitSoupRequestInputStreamHasDataToRead(stream) && !webkitSoupRequestInputStreamIsWaitingForData(stream)) { … … 144 144 return; 145 145 146 MutexLocker locker(stream->priv->readLock);146 DeprecatedMutexLocker locker(stream->priv->readLock); 147 147 148 148 if (dataLength) { -
trunk/Tools/ChangeLog
r187965 r187972 1 2015-08-04 Filip Pizlo <[email protected]> 2 3 Rename Mutex to DeprecatedMutex 4 https://bugs.webkit.org/show_bug.cgi?id=147675 5 6 Reviewed by Geoffrey Garen. 7 8 * DumpRenderTree/JavaScriptThreading.cpp: 9 (javaScriptThreadsMutex): 10 (runJavaScriptThread): 11 (startJavaScriptThreads): 12 (stopJavaScriptThreads): 13 * TestWebKitAPI/Tests/WTF/WorkQueue.cpp: 14 (TestWebKitAPI::TEST): 15 * TestWebKitAPI/Tests/WTF/glib/WorkQueueGLib.cpp: 16 (TestWebKitAPI::TEST): 17 1 18 2015-08-05 Timothy Hatcher <[email protected]> 2 19 -
trunk/Tools/DumpRenderTree/JavaScriptThreading.cpp
r179319 r187972 45 45 static JSContextGroupRef javaScriptThreadsGroup; 46 46 47 static Mutex& javaScriptThreadsMutex()47 static DeprecatedMutex& javaScriptThreadsMutex() 48 48 { 49 DEPRECATED_DEFINE_STATIC_LOCAL( Mutex, staticMutex, ());49 DEPRECATED_DEFINE_STATIC_LOCAL(DeprecatedMutex, staticMutex, ()); 50 50 return staticMutex; 51 51 } … … 71 71 JSGlobalContextRef ctx; 72 72 { 73 MutexLocker locker(javaScriptThreadsMutex());73 DeprecatedMutexLocker locker(javaScriptThreadsMutex()); 74 74 ctx = JSGlobalContextCreateInGroup(javaScriptThreadsGroup, 0); 75 75 } … … 77 77 JSStringRef scriptRef; 78 78 { 79 MutexLocker locker(javaScriptThreadsMutex());79 DeprecatedMutexLocker locker(javaScriptThreadsMutex()); 80 80 scriptRef = JSStringCreateWithUTF8CString(script); 81 81 } … … 83 83 while (true) { 84 84 { 85 MutexLocker locker(javaScriptThreadsMutex());85 DeprecatedMutexLocker locker(javaScriptThreadsMutex()); 86 86 JSValueRef exception = 0; 87 87 JSEvaluateScript(ctx, scriptRef, 0, 0, 1, &exception); … … 90 90 91 91 { 92 MutexLocker locker(javaScriptThreadsMutex());92 DeprecatedMutexLocker locker(javaScriptThreadsMutex()); 93 93 const size_t valuesCount = 1024; 94 94 JSValueRef values[valuesCount]; … … 98 98 99 99 { 100 MutexLocker locker(javaScriptThreadsMutex());100 DeprecatedMutexLocker locker(javaScriptThreadsMutex()); 101 101 if (javaScriptThreadsShouldTerminate) 102 102 break; … … 107 107 continue; 108 108 109 MutexLocker locker(javaScriptThreadsMutex());109 DeprecatedMutexLocker locker(javaScriptThreadsMutex()); 110 110 ThreadIdentifier thread = currentThread(); 111 111 detachThread(thread); … … 115 115 } 116 116 117 MutexLocker locker(javaScriptThreadsMutex());117 DeprecatedMutexLocker locker(javaScriptThreadsMutex()); 118 118 JSStringRelease(scriptRef); 119 119 JSGarbageCollect(ctx); … … 125 125 javaScriptThreadsGroup = JSContextGroupCreate(); 126 126 127 MutexLocker locker(javaScriptThreadsMutex());127 DeprecatedMutexLocker locker(javaScriptThreadsMutex()); 128 128 129 129 for (size_t i = 0; i < javaScriptThreadsCount; ++i) … … 134 134 { 135 135 { 136 MutexLocker locker(javaScriptThreadsMutex());136 DeprecatedMutexLocker locker(javaScriptThreadsMutex()); 137 137 javaScriptThreadsShouldTerminate = true; 138 138 } … … 140 140 Vector<ThreadIdentifier, javaScriptThreadsCount> threads; 141 141 { 142 MutexLocker locker(javaScriptThreadsMutex());142 DeprecatedMutexLocker locker(javaScriptThreadsMutex()); 143 143 copyToVector(javaScriptThreads(), threads); 144 144 ASSERT(threads.size() == javaScriptThreadsCount); … … 149 149 150 150 { 151 MutexLocker locker(javaScriptThreadsMutex());151 DeprecatedMutexLocker locker(javaScriptThreadsMutex()); 152 152 javaScriptThreads().clear(); 153 153 } -
trunk/Tools/TestWebKitAPI/Tests/WTF/WorkQueue.cpp
r181880 r187972 41 41 TEST(WTF_WorkQueue, Simple) 42 42 { 43 Mutex m_lock;43 DeprecatedMutex m_lock; 44 44 ThreadCondition m_testCompleted; 45 45 Vector<std::string> m_functionCallOrder; … … 57 57 EXPECT_EQ(1, initialRefCount); 58 58 59 MutexLocker locker(m_lock);59 DeprecatedMutexLocker locker(m_lock); 60 60 queue->dispatch([&](void) { 61 61 m_functionCallOrder.append(simpleTestLabel); … … 70 70 71 71 queue->dispatch([&](void) { 72 MutexLocker locker(m_lock);72 DeprecatedMutexLocker locker(m_lock); 73 73 m_functionCallOrder.append(thirdTestLabel); 74 74 calledThirdTest = true; … … 97 97 TEST(WTF_WorkQueue, TwoQueues) 98 98 { 99 Mutex m_lock;99 DeprecatedMutex m_lock; 100 100 ThreadCondition m_testQueue1Completed, m_testQueue2Completed; 101 101 Vector<std::string> m_functionCallOrder; … … 111 111 EXPECT_EQ(1, queue2->refCount()); 112 112 113 MutexLocker locker(m_lock);113 DeprecatedMutexLocker locker(m_lock); 114 114 115 115 queue1->dispatch([&](void) { … … 121 121 std::this_thread::sleep_for(std::chrono::milliseconds(50)); 122 122 123 MutexLocker locker(m_lock);123 DeprecatedMutexLocker locker(m_lock); 124 124 125 125 // Will fail if queue2 took the mutex before queue1. … … 132 132 133 133 queue1->dispatch([&](void) { 134 MutexLocker locker(m_lock);134 DeprecatedMutexLocker locker(m_lock); 135 135 m_functionCallOrder.append(thirdTestLabel); 136 136 calledThirdTest = true; … … 159 159 TEST(WTF_WorkQueue, DispatchAfter) 160 160 { 161 Mutex m_lock;161 DeprecatedMutex m_lock; 162 162 ThreadCondition m_testCompleted, m_dispatchAfterTestCompleted; 163 163 Vector<std::string> m_functionCallOrder; … … 168 168 auto queue = WorkQueue::create("com.apple.WebKit.Test.dispatchAfter"); 169 169 170 MutexLocker locker(m_lock);171 172 queue->dispatch([&](void) { 173 MutexLocker locker(m_lock);170 DeprecatedMutexLocker locker(m_lock); 171 172 queue->dispatch([&](void) { 173 DeprecatedMutexLocker locker(m_lock); 174 174 m_functionCallOrder.append(simpleTestLabel); 175 175 calledSimpleTest = true; … … 178 178 179 179 queue->dispatchAfter(std::chrono::milliseconds(500), [&](void) { 180 MutexLocker locker(m_lock);180 DeprecatedMutexLocker locker(m_lock); 181 181 m_functionCallOrder.append(dispatchAfterLabel); 182 182 calledDispatchAfterTest = true; -
trunk/Tools/TestWebKitAPI/Tests/WTF/glib/WorkQueueGLib.cpp
r185502 r187972 38 38 { 39 39 struct TestingContext { 40 Mutex m_lock;40 DeprecatedMutex m_lock; 41 41 ThreadCondition m_testCompleted; 42 42 GMainContext* m_mainContext; … … 50 50 GRefPtr<GFile> file = adoptGRef(g_file_new_for_path(currentDirectory.get())); 51 51 52 MutexLocker locker(context.m_lock);52 DeprecatedMutexLocker locker(context.m_lock); 53 53 queue->dispatch([&](void) { 54 54 EXPECT_TRUE(g_main_context_get_thread_default()); … … 58 58 [](GObject*, GAsyncResult*, gpointer userData) { 59 59 TestingContext* context = static_cast<TestingContext*>(userData); 60 MutexLocker locker(context->m_lock);60 DeprecatedMutexLocker locker(context->m_lock); 61 61 EXPECT_EQ(g_main_context_get_thread_default(), context->m_mainContext); 62 62 context->m_testCompleted.signal();
Note:
See TracChangeset
for help on using the changeset viewer.