diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-09-06 10:32:40 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-09-06 10:32:40 +0200 |
commit | 2d33b998c72d57abcde836bd2985ad72265d9697 (patch) | |
tree | 7e6cb902694ac348b6b785a14a997451d0b80951 /xpcom | |
parent | 47f4227deac7db16fbb8f4aec0376f552fc296b5 (diff) | |
parent | 9fdff854ebf1fe1a118061d57fd0a2d6c5c7dfd7 (diff) | |
download | UXP-2d33b998c72d57abcde836bd2985ad72265d9697.tar UXP-2d33b998c72d57abcde836bd2985ad72265d9697.tar.gz UXP-2d33b998c72d57abcde836bd2985ad72265d9697.tar.lz UXP-2d33b998c72d57abcde836bd2985ad72265d9697.tar.xz UXP-2d33b998c72d57abcde836bd2985ad72265d9697.zip |
Merge branch 'release' into Pale_Moon-release
# Conflicts:
# application/palemoon/config/version.txt
Diffstat (limited to 'xpcom')
-rw-r--r-- | xpcom/threads/nsThreadPool.cpp | 4 |
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 |