Bug 1858657 - Set mShutdown to true to avoid crashing, r=necko-reviewers,valentin

Differential Revision: https://phabricator.services.mozilla.com/D190790
This commit is contained in:
Kershaw Chang 2023-10-16 08:05:19 +00:00
Родитель 94aa7b91f0
Коммит 179a4792c5
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -198,6 +198,9 @@ nsresult CacheIOThread::Init() {
PR_CreateThread(PR_USER_THREAD, ThreadFunc, this, PR_PRIORITY_NORMAL,
PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, 128 * 1024);
if (!mThread) {
// Treat this thread as already shutdown.
MonitorAutoLock lock(mMonitor);
mShutdown = true;
return NS_ERROR_FAILURE;
}