summaryrefslogtreecommitdiffstats
path: root/xpcom
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-09-06 10:31:35 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-09-06 10:31:35 +0200
commit0f7f961e8894c8408b7fa21bbeba7ac503d372eb (patch)
tree033c37b3e8ca856d8b35d2408afa5269f0237078 /xpcom
parentdba27e6f639954060b9353c6d8f594eab0e06a99 (diff)
parent6db06749e2037029adc96660aafa5339ed609e60 (diff)
downloadUXP-0f7f961e8894c8408b7fa21bbeba7ac503d372eb.tar
UXP-0f7f961e8894c8408b7fa21bbeba7ac503d372eb.tar.gz
UXP-0f7f961e8894c8408b7fa21bbeba7ac503d372eb.tar.lz
UXP-0f7f961e8894c8408b7fa21bbeba7ac503d372eb.tar.xz
UXP-0f7f961e8894c8408b7fa21bbeba7ac503d372eb.zip
Merge branch 'master' into Basilisk-releasev2019.09.12
Diffstat (limited to 'xpcom')
-rw-r--r--xpcom/threads/nsThreadPool.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/xpcom/threads/nsThreadPool.cpp b/xpcom/threads/nsThreadPool.cpp
index 241fad39d..eb967870a 100644
--- a/xpcom/threads/nsThreadPool.cpp
+++ b/xpcom/threads/nsThreadPool.cpp
@@ -112,7 +112,9 @@ nsThreadPool::PutEvent(already_AddRefed<nsIRunnable> aEvent, uint32_t aFlags)
bool killThread = false;
{
MutexAutoLock lock(mMutex);
- if (mThreads.Count() < (int32_t)mThreadLimit) {
+ if (mShutdown) {
+ killThread = true; // we're in shutdown, kill the thread
+ } else if (mThreads.Count() < (int32_t)mThreadLimit) {
mThreads.AppendObject(thread);
} else {
killThread = true; // okay, we don't need this thread anymore