зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 57167b45c9d3 (bug 1183141) for wpt failures.
CLOSED TREE
This commit is contained in:
Родитель
66a68d91af
Коммит
0011e3d331
|
@ -3996,7 +3996,19 @@ FireControllerChangeOnMatchingDocument(nsISupports* aKey,
|
|||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
static PLDHashOperator
|
||||
ClaimMatchingClients(nsISupportsHashKey* aKey, void* aData)
|
||||
{
|
||||
nsRefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
|
||||
ServiceWorkerRegistrationInfo* workerRegistration =
|
||||
static_cast<ServiceWorkerRegistrationInfo*>(aData);
|
||||
nsCOMPtr<nsIDocument> document = do_QueryInterface(aKey->GetKey());
|
||||
|
||||
swm->MaybeClaimClient(document, workerRegistration);
|
||||
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
void
|
||||
ServiceWorkerManager::GetAllClients(nsIPrincipal* aPrincipal,
|
||||
|
@ -4064,11 +4076,7 @@ ServiceWorkerManager::ClaimClients(nsIPrincipal* aPrincipal,
|
|||
return NS_ERROR_DOM_INVALID_STATE_ERR;
|
||||
}
|
||||
|
||||
nsRefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
|
||||
for (auto iter = mAllDocuments.Iter(); !iter.Done(); iter.Next()) {
|
||||
nsCOMPtr<nsIDocument> document = do_QueryInterface(iter.Get()->GetKey());
|
||||
swm->MaybeClaimClient(document, registration);
|
||||
}
|
||||
mAllDocuments.EnumerateEntries(ClaimMatchingClients, registration);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче