Closed Bug 1572505 Opened 4 months ago Closed 4 months ago

Convert network.dns.disablePrefetchFromHTTPS to use a Static Pref

Categories

(Core :: Preferences: Backend, task)

task
Not set

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: KrisWright, Assigned: KrisWright)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

network.dns.disablePrefetchFromHTTPS needs to be converted from a VarCache pref to a static pref.

For this particular pref, AddBoolVarCache is called and defaulted to false, but the value then immediately uses true as a fallback, and a quick check tells me that sDisablePrefetchHTTPSPref is set to true: https://searchfox.org/mozilla-central/rev/9ae20497229225cb3fa729a787791f424ff8087b/dom/html/nsHTMLDNSPrefetch.cpp#68

This is not the best practice since code consulting the VarCache will think the feature is disabled, while code that may consult the prefs table will see that the pref doesn't exist, presumably concluding that the feature is not disabled. It appears the pref should actually be set to true as a default when adding it to StaticPrefs.

Converts network.dns.disablePrefetchFromHTTPS to a static pref. Though the original VarCache pref default to false, it looks like the intended value is true. (see comment #0 in bug 1572505)

Pushed by kwright@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2cdac58bb3a1
Convert network.dns.disablePrefetchFromHTTPS to static pref. r=smaug,njn
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Assignee: nobody → kwright
You need to log in before you can comment on or make changes to this bug.