Issue #1442 - Part 12b - Allow idle worker shutdown while Cache/CacheStorage DOM objects exist, but block it during Cache operation. https://bugzilla.mozilla.org/show_bug.cgi?id=1362444 Pre-requisite for Part 13.

This commit is contained in:
Brian Smith 2023-09-28 17:35:26 -05:00 committed by roytam1
commit 0b450a3def
4 changed files with 45 additions and 9 deletions

View file

@ -204,7 +204,8 @@ CacheStorage::CreateOnWorker(Namespace aNamespace, nsIGlobalObject* aGlobal,
}
RefPtr<CacheWorkerHolder> workerHolder =
CacheWorkerHolder::Create(aWorkerPrivate);
CacheWorkerHolder::Create(aWorkerPrivate,
CacheWorkerHolder::AllowIdleShutdownStart);
if (!workerHolder) {
NS_WARNING("Worker thread is shutting down.");
aRv.Throw(NS_ERROR_FAILURE);