[XPCOM] xpcom/threads misc cleanup

This commit is contained in:
Moonchild 2022-04-08 21:54:05 +02:00 committed by roytam1
commit 7de4e86727
3 changed files with 24 additions and 11 deletions

View file

@ -137,10 +137,15 @@ LazyIdleThread::EnsureThread()
return NS_OK;
}
MOZ_ASSERT(!mPendingEventCount, "Shouldn't have events yet!");
MOZ_ASSERT(!mIdleNotificationCount, "Shouldn't have idle events yet!");
MOZ_ASSERT(!mIdleTimer, "Should have killed this long ago!");
MOZ_ASSERT(!mThreadIsShuttingDown, "Should have cleared that!");
#ifdef DEBUG
{ // Lock scope
MutexAutoLock lock(mMutex);
MOZ_ASSERT(!mPendingEventCount, "Shouldn't have events yet!");
MOZ_ASSERT(!mIdleNotificationCount, "Shouldn't have idle events yet!");
MOZ_ASSERT(!mIdleTimer, "Should have killed this long ago!");
MOZ_ASSERT(!mThreadIsShuttingDown, "Should have cleared that!");
}
#endif
nsresult rv;