Bug 1217909 P11 Only report errors to documents that are active and not in the bfcache. r=catalinb

This commit is contained in:
Ben Kelly 2015-11-16 08:04:11 -08:00
parent 872376ea6c
commit b90bf89f8f

View File

@ -2403,7 +2403,7 @@ ServiceWorkerManager::ReportToAllClients(const nsCString& aScope,
}
nsCOMPtr<nsIDocument> doc = do_QueryInterface(iter.Key());
if (!doc || !doc->GetWindow()) {
if (!doc || !doc->IsCurrentActiveDocument() || !doc->GetWindow()) {
continue;
}
@ -2430,6 +2430,10 @@ ServiceWorkerManager::ReportToAllClients(const nsCString& aScope,
continue;
}
if (!doc->IsCurrentActiveDocument()) {
continue;
}
uint64_t innerWindowId = doc->InnerWindowID();
if (windows.Contains(innerWindowId)) {
continue;