Bug 1637869 - P4. Access pref via staticpref. r=mattwoodrow,necko-reviewers

It would otherwise triggers browser/base/content/test/performance/browser_preferences_usage.js

That pref would have been checked with every single load, a staticpref is O-1 .

Differential Revision: https://phabricator.services.mozilla.com/D76317
This commit is contained in:
Jean-Yves Avenard 2020-05-28 04:07:15 +00:00
parent da36716654
commit fc71e1daf1
2 changed files with 8 additions and 1 deletions

View File

@ -8960,7 +8960,7 @@ bool nsDocShell::CanLoadInParentProcess(nsIURI* aURI) {
}
// Final exception for some legacy automated tests:
if (xpc::IsInAutomation() &&
Preferences::GetBool("security.allow_unsafe_parent_loads", false)) {
StaticPrefs::security_allow_unsafe_parent_loads()) {
return true;
}
return false;

View File

@ -8408,6 +8408,13 @@
value: true
mirror: always
# Disallowed by default, ensure not disallowed content is loaded in the parent
# process.
- name: security.allow_unsafe_parent_loads
type: bool
value: false
mirror: always
# Pref to block mixed scripts (fonts, plugin content, scripts, stylesheets,
# iframes, websockets, XHR).
- name: security.mixed_content.block_active_content