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
|
nsresult
|
||||||
nsHTMLDNSPrefetch::Prefetch(Link *aElement, PRUint16 flags)
|
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))
|
if (!(sInitialized && sPrefetches && sDNSService && sDNSListener))
|
||||||
return NS_ERROR_NOT_AVAILABLE;
|
return NS_ERROR_NOT_AVAILABLE;
|
||||||
|
|
||||||
@ -299,11 +288,16 @@ nsHTMLDNSPrefetch::nsDeferrals::SubmitQueue()
|
|||||||
hrefURI->GetAsciiHost(hostName);
|
hrefURI->GetAsciiHost(hostName);
|
||||||
|
|
||||||
if (!hostName.IsEmpty()) {
|
if (!hostName.IsEmpty()) {
|
||||||
nsCOMPtr<nsICancelable> tmpOutstanding;
|
if (IsNeckoChild()) {
|
||||||
|
gNeckoChild->SendHTMLDNSPrefetch(NS_ConvertUTF8toUTF16(hostName),
|
||||||
|
mEntries[mTail].mFlags);
|
||||||
|
} else {
|
||||||
|
nsCOMPtr<nsICancelable> tmpOutstanding;
|
||||||
|
|
||||||
sDNSService->AsyncResolve(hostName,
|
sDNSService->AsyncResolve(hostName,
|
||||||
mEntries[mTail].mFlags | nsIDNSService::RESOLVE_SPECULATE,
|
mEntries[mTail].mFlags | nsIDNSService::RESOLVE_SPECULATE,
|
||||||
sDNSListener, nsnull, getter_AddRefs(tmpOutstanding));
|
sDNSListener, nsnull, getter_AddRefs(tmpOutstanding));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user