commit 90ce06af4580a2f8b7d09d8d1844a6b2b9553c12
parent b017947c95fb5fd11cc6ff83b39756016f65c18b
Author: Cosmin Sabou <csabou@mozilla.com>
Date: Fri, 9 Jan 2026 20:16:16 +0200
Revert "Bug 2009073 - Crash instead of returning error when thread creation fails in nsThreadPool::PutEvent(). r=xpcom-reviewers,jstutte" as requested by the developer.
This reverts commit c04c964cc11d046e24be066ed97a4686621af148.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xpcom/threads/nsThreadPool.cpp b/xpcom/threads/nsThreadPool.cpp
@@ -209,7 +209,7 @@ nsresult nsThreadPool::PutEvent(already_AddRefed<nsIRunnable> aEvent,
mThreadNaming.GetNextThreadName(mName), getter_AddRefs(thread), this,
{.stackSize = mStackSize, .blockDispatch = true});
if (NS_WARN_IF(NS_FAILED(rv))) {
- MOZ_CRASH("nsThreadPool::PutEvent() - Failed to create a new thread");
+ return NS_ERROR_UNEXPECTED;
}
mThreads.AppendObject(thread);