mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 473974. Don't DNS-prefetch nodes whose document went away. r+sr=bzbarsky
This commit is contained in:
parent
dbd10e746e
commit
a6550e3070
@ -282,18 +282,22 @@ nsHTMLDNSPrefetch::nsDeferrals::SubmitQueue()
|
||||
if (!sDNSService) return;
|
||||
|
||||
while (mHead != mTail) {
|
||||
nsCOMPtr<nsIURI> hrefURI;
|
||||
mEntries[mTail].mElement->GetHrefURIForAnchors(getter_AddRefs(hrefURI));
|
||||
if (hrefURI)
|
||||
hrefURI->GetAsciiHost(hostName);
|
||||
|
||||
if (!hostName.IsEmpty()) {
|
||||
nsCOMPtr<nsICancelable> tmpOutstanding;
|
||||
|
||||
sDNSService->AsyncResolve(hostName,
|
||||
mEntries[mTail].mFlags,
|
||||
sDNSListener, nsnull, getter_AddRefs(tmpOutstanding));
|
||||
if (mEntries[mTail].mElement->GetOwnerDoc()) {
|
||||
nsCOMPtr<nsIURI> hrefURI;
|
||||
mEntries[mTail].mElement->GetHrefURIForAnchors(getter_AddRefs(hrefURI));
|
||||
if (hrefURI)
|
||||
hrefURI->GetAsciiHost(hostName);
|
||||
|
||||
if (!hostName.IsEmpty()) {
|
||||
nsCOMPtr<nsICancelable> tmpOutstanding;
|
||||
|
||||
sDNSService->AsyncResolve(hostName,
|
||||
mEntries[mTail].mFlags,
|
||||
sDNSListener, nsnull, getter_AddRefs(tmpOutstanding));
|
||||
}
|
||||
}
|
||||
|
||||
mEntries[mTail].mElement = nsnull;
|
||||
mTail = (mTail + 1) & sMaxDeferredMask;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user