mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 09:15:35 +00:00
Bug 1570212 - Convert dom.securecontext.whitelist_onions to a static pref. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D40160 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
cdffde3415
commit
dd63fcde4e
@ -36,6 +36,7 @@
|
||||
#include "prnetdb.h"
|
||||
|
||||
#include "mozilla/Logging.h"
|
||||
#include "mozilla/StaticPrefs_dom.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "mozilla/ipc/URIUtils.h"
|
||||
@ -387,14 +388,7 @@ bool nsMixedContentBlocker::IsPotentiallyTrustworthyLoopbackURL(nsIURI* aURL) {
|
||||
* `dom.securecontext.whitelist_onions` is `true`.
|
||||
*/
|
||||
bool nsMixedContentBlocker::IsPotentiallyTrustworthyOnion(nsIURI* aURL) {
|
||||
static bool sInited = false;
|
||||
static bool sWhiteListOnions = false;
|
||||
if (!sInited) {
|
||||
Preferences::AddBoolVarCache(&sWhiteListOnions,
|
||||
"dom.securecontext.whitelist_onions");
|
||||
sInited = true;
|
||||
}
|
||||
if (!sWhiteListOnions) {
|
||||
if (!StaticPrefs::dom_securecontext_whitelist_onions()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1900,6 +1900,11 @@
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
- name: dom.securecontext.whitelist_onions
|
||||
type: bool
|
||||
value: false
|
||||
mirror: always
|
||||
|
||||
# This pref enables FeaturePolicy logic and the parsing of 'allow' attribute in
|
||||
# HTMLIFrameElement objects.
|
||||
- name: dom.security.featurePolicy.enabled
|
||||
|
Loading…
Reference in New Issue
Block a user