☠☠ backed out by accb1b3cf593 ☠ ☠ | |
author | Boris Zbarsky <bzbarsky@mit.edu> |
Thu, 01 Mar 2018 14:24:17 -0500 | |
changeset 406202 | 8fc2c103027ba37bd50dec5e2fe8b79d3d68c28c |
parent 406201 | cf67ac6f58d0fc08af06d9bd6f0247e9288e0568 |
child 406203 | 9788a46b8874dbc1a785e9eef091a9fc2e0b4f36 |
push id | 33546 |
push user | aciure@mozilla.com |
push date | Fri, 02 Mar 2018 10:16:37 +0000 |
treeherder | mozilla-central@b2a9a4bb5c94 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | bholley |
bugs | 1442313 |
milestone | 60.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/js/xpconnect/src/xpcpublic.h +++ b/js/xpconnect/src/xpcpublic.h @@ -672,20 +672,26 @@ AreNonLocalConnectionsDisabled() } } return disabledForTest; } inline bool IsInAutomation() { - const char* prefName = - "security.turn_off_all_security_so_that_viruses_can_take_over_this_computer"; - return mozilla::Preferences::GetBool(prefName) && - AreNonLocalConnectionsDisabled(); + static bool sAutomationPrefIsSet; + static bool sPrefCacheAdded = false; + if (!sPrefCacheAdded) { + mozilla::Preferences::AddBoolVarCache( + &sAutomationPrefIsSet, + "security.turn_off_all_security_so_that_viruses_can_take_over_this_computer", + false); + sPrefCacheAdded = true; + } + return sAutomationPrefIsSet && AreNonLocalConnectionsDisabled(); } void CreateCooperativeContext(); void DestroyCooperativeContext();