mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 697830 - Delayed DNS prefetch queue is disabled for e10s. r=jduell
This commit is contained in:
parent
787e4ee230
commit
e5d5b09ad2
@ -140,17 +140,6 @@ nsHTMLDNSPrefetch::IsAllowed (nsIDocument *aDocument)
|
||||
nsresult
|
||||
nsHTMLDNSPrefetch::Prefetch(Link *aElement, PRUint16 flags)
|
||||
{
|
||||
if (IsNeckoChild()) {
|
||||
// Instead of transporting the Link object to the other process
|
||||
// we are using the hostname based function here, too. Compared to the
|
||||
// IPC the performance hit should be negligible.
|
||||
nsAutoString hostname;
|
||||
nsresult rv = aElement->GetHostname(hostname);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
|
||||
return Prefetch(hostname, flags);
|
||||
}
|
||||
|
||||
if (!(sInitialized && sPrefetches && sDNSService && sDNSListener))
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
@ -299,6 +288,10 @@ nsHTMLDNSPrefetch::nsDeferrals::SubmitQueue()
|
||||
hrefURI->GetAsciiHost(hostName);
|
||||
|
||||
if (!hostName.IsEmpty()) {
|
||||
if (IsNeckoChild()) {
|
||||
gNeckoChild->SendHTMLDNSPrefetch(NS_ConvertUTF8toUTF16(hostName),
|
||||
mEntries[mTail].mFlags);
|
||||
} else {
|
||||
nsCOMPtr<nsICancelable> tmpOutstanding;
|
||||
|
||||
sDNSService->AsyncResolve(hostName,
|
||||
@ -306,6 +299,7 @@ nsHTMLDNSPrefetch::nsDeferrals::SubmitQueue()
|
||||
sDNSListener, nsnull, getter_AddRefs(tmpOutstanding));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mEntries[mTail].mElement = nsnull;
|
||||
mTail = (mTail + 1) & sMaxDeferredMask;
|
||||
|
Loading…
Reference in New Issue
Block a user