mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1179489 - Don't count service workers towards an origin's max worker quota; r=nsm
This is a follow-up to bug 1178339.
This commit is contained in:
parent
58e0eabbd0
commit
d0d2389e74
@ -1668,7 +1668,7 @@ RuntimeService::UnregisterWorker(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
|
||||
}
|
||||
}
|
||||
|
||||
if (!domainInfo->ActiveWorkerCount()) {
|
||||
if (domainInfo->HasNoWorkers()) {
|
||||
MOZ_ASSERT(domainInfo->mQueuedWorkers.IsEmpty());
|
||||
mDomainMap.Remove(domain);
|
||||
}
|
||||
|
@ -56,9 +56,21 @@ class RuntimeService final : public nsIObserver
|
||||
ActiveWorkerCount() const
|
||||
{
|
||||
return mActiveWorkers.Length() +
|
||||
mActiveServiceWorkers.Length() +
|
||||
mChildWorkerCount;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
ActiveServiceWorkerCount() const
|
||||
{
|
||||
return mActiveServiceWorkers.Length();
|
||||
}
|
||||
|
||||
bool
|
||||
HasNoWorkers() const
|
||||
{
|
||||
return ActiveWorkerCount() == 0 &&
|
||||
ActiveServiceWorkerCount() == 0;
|
||||
}
|
||||
};
|
||||
|
||||
struct IdleThreadInfo;
|
||||
|
Loading…
Reference in New Issue
Block a user