Bug 1443932 - part 2 - lower the default stack size for image decoder threads; r=tnikkel

These threads should not have deep stacks, and as we can have a number
of them running simultaneously, it's beneficial to set the stack size to
something reasonably low.
This commit is contained in:
Nathan Froyd 2018-03-07 20:33:17 -05:00
parent e7492f2d00
commit 87bc1e3aa8

View File

@ -309,7 +309,8 @@ bool DecodePoolImpl::CreateThread()
nsCOMPtr<nsIRunnable> worker = new DecodePoolWorker(this, shutdownIdle);
nsCOMPtr<nsIThread> thread;
nsresult rv = NS_NewNamedThread(mThreadNaming.GetNextThreadName("ImgDecoder"),
getter_AddRefs(thread), worker);
getter_AddRefs(thread), worker,
nsIThreadManager::kThreadPoolStackSize);
if (NS_FAILED(rv) || !thread) {
MOZ_ASSERT_UNREACHABLE("Should successfully create image decoding threads");
return false;