gecko-dev/xpcom/threads
Nika Layzell 3065034574 Bug 1764119 - Part 2: Don't check gXPCOMThreadsShutdown in ThreadEventTarget::Dispatch, r=xpcom-reviewers,kmag,jstutte
We already have a mechanism for ending threads accepting new messages
when they are shut down, so this only allows tasks started from thread
shutdown tasks during xpcom shutdown to behave consistently.

We already didn't prevent dispatching to the background thread pool at
this time, so it should make little difference there as well, and may
just instead save us from deadlocks where code expects a dispatch to
succeed and it does not during actor shutdown.

This patch both relaxes the check to only be a NS_ASSERTION, and relaxes
it to allow dispatching to the current thread even after
xpcom-shutdown-threads as that thread is definitely still alive.

Differential Revision: https://phabricator.services.mozilla.com/D144592
2022-05-02 20:38:43 +00:00
..
AbstractThread.cpp Bug 1738106 - Part 4: Support ThreadSafeWeakPtr in TaskQueue, r=xpcom-reviewers,mccr8 2022-05-02 20:37:35 +00:00
AbstractThread.h Bug 1738106 - Part 4: Support ThreadSafeWeakPtr in TaskQueue, r=xpcom-reviewers,mccr8 2022-05-02 20:37:35 +00:00
BlockingResourceBase.cpp Bug 1761536 - Part 2: Replace nsTArray::elem_type with value_type, r=mccr8 2022-04-01 17:00:25 +00:00
BlockingResourceBase.h Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw 2022-03-16 18:47:08 +00:00
CPUUsageWatcher.cpp
CPUUsageWatcher.h
CondVar.h Bug 1207753 - Base thread-safety attribution support r=nika 2022-03-16 23:01:41 +00:00
DataMutex.h
DeadlockDetector.h
DelayedRunnable.cpp Bug 1738103 - Part 4: Add XPCOM support for shutdown tasks, r=necko-reviewers,KrisWright 2022-03-23 22:22:04 +00:00
DelayedRunnable.h Bug 1738103 - Part 4: Add XPCOM support for shutdown tasks, r=necko-reviewers,KrisWright 2022-03-23 22:22:04 +00:00
EventQueue.cpp Bug 1738627 - Store distinct profiling features of individual threads - r=canaltinova 2021-11-08 23:59:35 +00:00
EventQueue.h Bug 1734809 - add a new task priority between vsync and control, r=bas 2021-10-08 19:29:36 +00:00
IdlePeriodState.cpp
IdlePeriodState.h
IdleTaskRunner.cpp Bug 1754562, make parent process' idle detection be aware of active RefreshDrivers in the other processes, r=mstange 2022-02-26 22:37:03 +00:00
IdleTaskRunner.h Bug 1672121 - Stop sGCRunner GC slice if the IdleTaskRunnerTask gets a RequestInterrupt() call r=smaug 2021-12-22 18:06:06 +00:00
InputEventStatistics.cpp
InputEventStatistics.h
InputTaskManager.cpp
InputTaskManager.h Bug 1733729: Fix non-unified build bustage in xpcom directory. r=mccr8 2021-10-05 00:29:56 +00:00
LazyIdleThread.cpp Bug 1738103 - Part 4: Add XPCOM support for shutdown tasks, r=necko-reviewers,KrisWright 2022-03-23 22:22:04 +00:00
LazyIdleThread.h Bug 1207753 - Smaller xpcom/threads & xpfe thread-safety annotations r=nika 2022-03-21 23:04:07 +00:00
LeakRefPtr.h
MainThreadIdlePeriod.cpp Bug 1754562, make parent process' idle detection be aware of active RefreshDrivers in the other processes, r=mstange 2022-02-26 22:37:03 +00:00
MainThreadIdlePeriod.h
MainThreadUtils.h
Monitor.h Bug 1761107: Make Monitor.Wait() require the monitor be locked r=nika 2022-03-24 16:38:57 +00:00
MozPromise.h Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw 2022-03-16 18:47:08 +00:00
MozPromiseInlines.h
Mutex.h Bug 1760357 - Part 1: Fix typo and annotations on ReleasableAutoLock types, r=jesup 2022-03-22 14:59:40 +00:00
PerformanceCounter.cpp
PerformanceCounter.h
Queue.h Bug 1733308 - Fix non-unified builds errors in xpcom/tests/gtest. r=xpcom-reviewers,mccr8 2021-10-01 01:49:19 +00:00
RWLock.cpp Bug 1757100 - Move minimal platform-dependent part of RWLock to mozglue/misc/PlatformRWLock.h&cpp - r=glandium,xpcom-reviewers 2022-02-27 23:32:55 +00:00
RWLock.h Bug 1207753 - Base thread-safety attribution support r=nika 2022-03-16 23:01:41 +00:00
RecursiveMutex.cpp
RecursiveMutex.h Bug 1207753 - Base thread-safety attribution support r=nika 2022-03-16 23:01:41 +00:00
ReentrantMonitor.h Merge autoland to mozilla-central. a=merge 2022-03-26 11:27:55 +02:00
SchedulerGroup.cpp Bug 1751041 - Compute the process startup timestamp early during startup r=glandium 2022-01-26 19:57:41 +00:00
SchedulerGroup.h
SharedThreadPool.cpp Bug 1738103 - Part 4: Add XPCOM support for shutdown tasks, r=necko-reviewers,KrisWright 2022-03-23 22:22:04 +00:00
SharedThreadPool.h Bug 1738103 - Part 4: Add XPCOM support for shutdown tasks, r=necko-reviewers,KrisWright 2022-03-23 22:22:04 +00:00
SpinEventLoopUntil.h Bug 1207753 - Smaller xpcom/threads & xpfe thread-safety annotations r=nika 2022-03-21 23:04:07 +00:00
StateMirroring.h
StateWatching.h Backed out 2 changesets (bug 1738931) for causing mochitest failures on VideoConduit and WatchManager CLOSED TREE 2021-11-11 14:06:57 +02:00
SyncRunnable.h Bug 1207753 - Smaller xpcom/threads & xpfe thread-safety annotations r=nika 2022-03-21 23:04:07 +00:00
SynchronizedEventQueue.cpp
SynchronizedEventQueue.h Bug 1738103 - Part 4: Add XPCOM support for shutdown tasks, r=necko-reviewers,KrisWright 2022-03-23 22:22:04 +00:00
TaskCategory.h
TaskController.cpp Bug 1762090, don't block refreshdrivers for too long time on linux, r=mstange 2022-04-06 00:40:25 +00:00
TaskController.h Bug 1762090, don't block refreshdrivers for too long time on linux, r=mstange 2022-04-06 00:40:25 +00:00
TaskDispatcher.h Bug 1746361 - Gecko Profiler: Track wrapped runnables throughout the tree. r=gerald 2022-01-05 15:26:24 +00:00
TaskQueue.cpp Bug 1738106 - Part 5: Track TaskQueue lifetimes to avoid leaking TaskQueues, r=xpcom-reviewers,mccr8 2022-05-02 20:37:35 +00:00
TaskQueue.h Bug 1738106 - Part 5: Track TaskQueue lifetimes to avoid leaking TaskQueues, r=xpcom-reviewers,mccr8 2022-05-02 20:37:35 +00:00
ThreadBound.h
ThreadDelay.cpp
ThreadDelay.h
ThreadEventQueue.cpp Bug 1738103 - Part 4: Add XPCOM support for shutdown tasks, r=necko-reviewers,KrisWright 2022-03-23 22:22:04 +00:00
ThreadEventQueue.h Bug 1738103 - Part 4: Add XPCOM support for shutdown tasks, r=necko-reviewers,KrisWright 2022-03-23 22:22:04 +00:00
ThreadEventTarget.cpp Bug 1764119 - Part 2: Don't check gXPCOMThreadsShutdown in ThreadEventTarget::Dispatch, r=xpcom-reviewers,kmag,jstutte 2022-05-02 20:38:43 +00:00
ThreadEventTarget.h Bug 1764119 - Part 2: Don't check gXPCOMThreadsShutdown in ThreadEventTarget::Dispatch, r=xpcom-reviewers,kmag,jstutte 2022-05-02 20:38:43 +00:00
ThreadLocalVariables.cpp
ThrottledEventQueue.cpp Bug 1207753 - ThrottledEventQueue thread-safety annotations r=nika 2022-03-26 00:58:47 +00:00
ThrottledEventQueue.h
TimerThread.cpp Bug 1766357 - Remove unused and empty TimerThread::InitLocks - r=smaug 2022-04-27 01:14:37 +00:00
TimerThread.h Bug 1766357 - Remove unused and empty TimerThread::InitLocks - r=smaug 2022-04-27 01:14:37 +00:00
VsyncTaskManager.cpp
VsyncTaskManager.h
components.conf Bug 1731890 - Adding Utility process with basic sandbox r=agi,nika,bobowen 2022-01-12 20:52:58 +00:00
moz.build Bug 1738103 - Part 4: Add XPCOM support for shutdown tasks, r=necko-reviewers,KrisWright 2022-03-23 22:22:04 +00:00
nsEnvironment.cpp Bug 1760315: nsEnvironment cleanup r=nika 2022-03-19 15:07:27 +00:00
nsEnvironment.h Bug 1760315: nsEnvironment cleanup r=nika 2022-03-19 15:07:27 +00:00
nsICancelableRunnable.h
nsIDirectTaskDispatcher.idl
nsIDiscardableRunnable.h
nsIEnvironment.idl
nsIEventTarget.idl Bug 1738103 - Part 4: Add XPCOM support for shutdown tasks, r=necko-reviewers,KrisWright 2022-03-23 22:22:04 +00:00
nsIIdlePeriod.idl
nsIIdleRunnable.h
nsINamed.idl
nsIProcess.idl
nsIRunnable.idl Bug 1748718 - Part 3: Remove now-unnecessary xpidl constant casts, r=emilio 2022-01-07 20:35:15 +00:00
nsISerialEventTarget.idl
nsISupportsPriority.idl
nsITargetShutdownTask.h Bug 1738103 - Part 4: Add XPCOM support for shutdown tasks, r=necko-reviewers,KrisWright 2022-03-23 22:22:04 +00:00
nsIThread.idl Bug 1747526 - Return a handle from asyncShutdown to observe and cancel thread shutdown progress, r=xpcom-reviewers,KrisWright 2022-02-08 23:58:03 +00:00
nsIThreadInternal.idl
nsIThreadManager.idl Bug 1761590 - Enter microtask when evaluating console/debugger input. r=nchevobbe,smaug 2022-04-14 01:42:59 +00:00
nsIThreadPool.idl
nsIThreadShutdown.idl Bug 1747526 - Return a handle from asyncShutdown to observe and cancel thread shutdown progress, r=xpcom-reviewers,KrisWright 2022-02-08 23:58:03 +00:00
nsITimer.idl Bug 683785 - Replace do_CreateInstance for nsITimer with new nsTimer r=xpcom-reviewers,necko-reviewers,nika,kershaw 2022-04-28 17:09:47 +00:00
nsMemoryPressure.cpp
nsMemoryPressure.h
nsProcess.h Bug 1207753 - Smaller xpcom/threads & xpfe thread-safety annotations r=nika 2022-03-21 23:04:07 +00:00
nsProcessCommon.cpp Bug 1762839 - Fix Win specific thread annotations in nsProcessCommon. r=jesup,rkraesig 2022-04-10 21:58:26 +00:00
nsProxyRelease.cpp
nsProxyRelease.h Bug 1735299 - Remove last use of unnammed NS_ReleaseOnMainThread r=extension-reviewers,rpl,nhnt11 2021-10-19 13:44:25 +00:00
nsThread.cpp Bug 1713773 - Part 1: Simplify nsThreadManager shutdown, r=xpcom-reviewers,mccr8 2022-04-12 20:22:24 +00:00
nsThread.h Bug 1713773 - Part 1: Simplify nsThreadManager shutdown, r=xpcom-reviewers,mccr8 2022-04-12 20:22:24 +00:00
nsThreadManager.cpp Bug 1764119 - Part 1: Do final KillClearOnShutdown after XPCOM threads shutdown, r=xpcom-reviewers,kmag,jstutte 2022-05-02 20:38:43 +00:00
nsThreadManager.h Bug 1764119 - Part 1: Do final KillClearOnShutdown after XPCOM threads shutdown, r=xpcom-reviewers,kmag,jstutte 2022-05-02 20:38:43 +00:00
nsThreadPool.cpp Bug 1738103 - Part 4: Add XPCOM support for shutdown tasks, r=necko-reviewers,KrisWright 2022-03-23 22:22:04 +00:00
nsThreadPool.h Bug 1207753 - xpcom nsThreadPool thread-safety annotations r=nika 2022-03-21 18:03:36 +00:00
nsThreadSyncDispatch.h
nsThreadUtils.cpp Bug 1738103 - Part 1: Remove the unused TailDispatchingTarget type, r=xpcom-reviewers,KrisWright 2022-03-23 22:22:02 +00:00
nsThreadUtils.h Bug 1738103 - Part 1: Remove the unused TailDispatchingTarget type, r=xpcom-reviewers,KrisWright 2022-03-23 22:22:02 +00:00
nsTimerImpl.cpp Bug 1766357 - Remove unused and empty TimerThread::InitLocks - r=smaug 2022-04-27 01:14:37 +00:00
nsTimerImpl.h Bug 1207753 - xpcom Timer thread-safety annotations r=nika 2022-03-19 03:43:57 +00:00