mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-03 13:57:31 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
ca56c33715
1 changed files with 8 additions and 1 deletions
|
|
@ -94,8 +94,15 @@ nsHTMLDNSPrefetch::Shutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
nsHTMLDNSPrefetch::IsAllowed (nsIDocument *aDocument)
|
nsHTMLDNSPrefetch::IsAllowed(nsIDocument *aDocument)
|
||||||
{
|
{
|
||||||
|
// Do not use prefetch if the document's node principal is the system
|
||||||
|
// principal.
|
||||||
|
nsCOMPtr<nsIPrincipal> principal = aDocument->NodePrincipal();
|
||||||
|
if (nsContentUtils::IsSystemPrincipal(principal)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// There is no need to do prefetch on non UI scenarios such as XMLHttpRequest.
|
// There is no need to do prefetch on non UI scenarios such as XMLHttpRequest.
|
||||||
return aDocument->IsDNSPrefetchAllowed() && aDocument->GetWindow();
|
return aDocument->IsDNSPrefetchAllowed() && aDocument->GetWindow();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue