Bug 1412191 - Fix CooperativeThreadPool thread count assertion (r=froydnj)
authorBill McCloskey <billm@mozilla.com>
Fri, 22 Sep 2017 14:36:30 -0700
changeset 444706 f367f91a3bde6553e3d93a479dca222a35a23904
parent 444705 ece293c2e9abbf0b10c9e5f587c5f20979aefd1a
child 444707 af490228394eeebd48dcc2c326a9d2bbe369d59a
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1412191
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1412191 - Fix CooperativeThreadPool thread count assertion (r=froydnj) MozReview-Commit-ID: 4oUM0rh4ySs
xpcom/threads/CooperativeThreadPool.cpp
--- a/xpcom/threads/CooperativeThreadPool.cpp
+++ b/xpcom/threads/CooperativeThreadPool.cpp
@@ -26,17 +26,17 @@ CooperativeThreadPool::CooperativeThread
   : mMutex(aMutex)
   , mShutdownCondition(mMutex, "CoopShutdown")
   , mRunning(false)
   , mNumThreads(std::min(aNumThreads, kMaxThreads))
   , mRunningThreads(0)
   , mController(aController)
   , mSelectedThread(size_t(0))
 {
-  MOZ_ASSERT(aNumThreads < kMaxThreads);
+  MOZ_ASSERT(aNumThreads <= kMaxThreads);
 
   gCooperativeSchedulingEnabled = true;
   sTlsCurrentThread.infallibleInit();
 
   MutexAutoLock lock(mMutex);
 
   mRunning = true;
   mRunningThreads = mNumThreads;