mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 11:57:32 +09:00
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:
parent
41216b88f6
commit
0b450a3def
4 changed files with 45 additions and 9 deletions
12
dom/cache/CacheOpChild.cpp
vendored
12
dom/cache/CacheOpChild.cpp
vendored
|
|
@ -74,7 +74,11 @@ CacheOpChild::CacheOpChild(CacheWorkerHolder* aWorkerHolder,
|
|||
MOZ_DIAGNOSTIC_ASSERT(mPromise);
|
||||
|
||||
MOZ_ASSERT_IF(!NS_IsMainThread(), aWorkerHolder);
|
||||
SetWorkerHolder(aWorkerHolder);
|
||||
RefPtr<CacheWorkerHolder> workerHolder =
|
||||
CacheWorkerHolder::PreferBehavior(aWorkerHolder,
|
||||
CacheWorkerHolder::PreventIdleShutdownStart);
|
||||
|
||||
SetWorkerHolder(workerHolder);
|
||||
}
|
||||
|
||||
CacheOpChild::~CacheOpChild()
|
||||
|
|
@ -165,7 +169,11 @@ CacheOpChild::Recv__delete__(const ErrorResult& aRv,
|
|||
break;
|
||||
}
|
||||
|
||||
actor->SetWorkerHolder(GetWorkerHolder());
|
||||
RefPtr<CacheWorkerHolder> workerHolder =
|
||||
CacheWorkerHolder::PreferBehavior(GetWorkerHolder(),
|
||||
CacheWorkerHolder::AllowIdleShutdownStart);
|
||||
|
||||
actor->SetWorkerHolder(workerHolder);
|
||||
RefPtr<Cache> cache = new Cache(mGlobal, actor);
|
||||
mPromise->MaybeResolve(cache);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue