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 7d57c84ad9
commit 43650d030e
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;