tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 0e3c4881ea87a98bde84d9101253b53ba2821159
parent f8bc9ef913c87ca65880860c52ef70402a9da4cd
Author: Harveer Singh <hsingh@mozilla.com>
Date:   Thu, 27 Nov 2025 16:52:47 +0000

Bug 2001760: Improving the return error code from TaskQueue::DispatchLocked in case we are in shutdown.r=jari

The linked bug has been intermittently failing. I think this could be because we are in shutdown. Improving the return code from the TaskQueue::DispatchLocked in case dispatch wasn't successful because we were shutting down.

Differential Revision: https://phabricator.services.mozilla.com/D274046

Diffstat:
Mxpcom/threads/TaskQueue.cpp | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xpcom/threads/TaskQueue.cpp b/xpcom/threads/TaskQueue.cpp @@ -100,7 +100,7 @@ nsresult TaskQueue::DispatchLocked(nsCOMPtr<nsIRunnable>& aRunnable, // Continue to allow dispatches after shutdown until the last message has been // processed, at which point no more messages will be accepted. if (mIsShutdown && !mIsRunning) { - return NS_ERROR_UNEXPECTED; + return NS_ERROR_ILLEGAL_DURING_SHUTDOWN; } AbstractThread* currentThread;