Loading dom/html/HTMLDNSPrefetch.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -180,6 +180,13 @@ static bool EnsureDNSService() { } bool HTMLDNSPrefetch::IsAllowed(Document* aDocument) { // Do not use prefetch if the document's node principal is the system // principal. nsCOMPtr<nsIPrincipal> principal = aDocument->NodePrincipal(); if (principal->IsSystemPrincipal()) { return false; } // There is no need to do prefetch on non UI scenarios such as XMLHttpRequest. return aDocument->IsDNSPrefetchAllowed() && aDocument->GetWindow(); } Loading Loading
dom/html/HTMLDNSPrefetch.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -180,6 +180,13 @@ static bool EnsureDNSService() { } bool HTMLDNSPrefetch::IsAllowed(Document* aDocument) { // Do not use prefetch if the document's node principal is the system // principal. nsCOMPtr<nsIPrincipal> principal = aDocument->NodePrincipal(); if (principal->IsSystemPrincipal()) { return false; } // There is no need to do prefetch on non UI scenarios such as XMLHttpRequest. return aDocument->IsDNSPrefetchAllowed() && aDocument->GetWindow(); } Loading