mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-24 08:07:30 +09:00
Issue #2547 - Remove hidden network.dns.disablePrefetchFromHTTPS pref.
Resolves #2547
This commit is contained in:
parent
c94c6a5785
commit
d0e568577f
2 changed files with 0 additions and 19 deletions
|
|
@ -2802,20 +2802,9 @@ nsDocument::GetPrincipal()
|
||||||
return NodePrincipal();
|
return NodePrincipal();
|
||||||
}
|
}
|
||||||
|
|
||||||
extern bool sDisablePrefetchHTTPSPref;
|
|
||||||
|
|
||||||
void
|
void
|
||||||
nsDocument::SetPrincipal(nsIPrincipal *aNewPrincipal)
|
nsDocument::SetPrincipal(nsIPrincipal *aNewPrincipal)
|
||||||
{
|
{
|
||||||
if (aNewPrincipal && mAllowDNSPrefetch && sDisablePrefetchHTTPSPref) {
|
|
||||||
nsCOMPtr<nsIURI> uri;
|
|
||||||
aNewPrincipal->GetURI(getter_AddRefs(uri));
|
|
||||||
bool isHTTPS;
|
|
||||||
if (!uri || NS_FAILED(uri->SchemeIs("https", &isHTTPS)) ||
|
|
||||||
isHTTPS) {
|
|
||||||
mAllowDNSPrefetch = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mNodeInfoManager->SetDocumentPrincipal(aNewPrincipal);
|
mNodeInfoManager->SetDocumentPrincipal(aNewPrincipal);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@ using namespace mozilla::dom;
|
||||||
using namespace mozilla::net;
|
using namespace mozilla::net;
|
||||||
|
|
||||||
static NS_DEFINE_CID(kDNSServiceCID, NS_DNSSERVICE_CID);
|
static NS_DEFINE_CID(kDNSServiceCID, NS_DNSSERVICE_CID);
|
||||||
bool sDisablePrefetchHTTPSPref;
|
|
||||||
static bool sInitialized = false;
|
static bool sInitialized = false;
|
||||||
static nsIDNSService *sDNSService = nullptr;
|
static nsIDNSService *sDNSService = nullptr;
|
||||||
static nsHTMLDNSPrefetch::nsDeferrals *sPrefetches = nullptr;
|
static nsHTMLDNSPrefetch::nsDeferrals *sPrefetches = nullptr;
|
||||||
|
|
@ -59,13 +58,6 @@ nsHTMLDNSPrefetch::Initialize()
|
||||||
|
|
||||||
sPrefetches->Activate();
|
sPrefetches->Activate();
|
||||||
|
|
||||||
Preferences::AddBoolVarCache(&sDisablePrefetchHTTPSPref,
|
|
||||||
"network.dns.disablePrefetchFromHTTPS");
|
|
||||||
|
|
||||||
// Default is false, so we need an explicit call to prime the cache.
|
|
||||||
sDisablePrefetchHTTPSPref =
|
|
||||||
Preferences::GetBool("network.dns.disablePrefetchFromHTTPS", true);
|
|
||||||
|
|
||||||
NS_IF_RELEASE(sDNSService);
|
NS_IF_RELEASE(sDNSService);
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
rv = CallGetService(kDNSServiceCID, &sDNSService);
|
rv = CallGetService(kDNSServiceCID, &sDNSService);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue