Bug 1295349 - Assert in UDPSocketParent::Init(). r=hurley

--HG--
extra : rebase_source : 5dc412d50002992a6a17d178c08b53ada2db636b
This commit is contained in:
Jason Duell 2016-08-18 21:55:00 -04:00
parent d1e8cf113e
commit 0a61eaae23
3 changed files with 9 additions and 7 deletions

View File

@ -12,7 +12,6 @@ namespace net {
namespace NeckoCommonInternal {
bool gSecurityDisabled = true;
bool gRegisteredBool = false;
} // namespace NeckoCommonInternal
} // namespace net

View File

@ -105,12 +105,6 @@ namespace NeckoCommonInternal {
inline bool
UsingNeckoIPCSecurity()
{
if (!NeckoCommonInternal::gRegisteredBool) {
Preferences::AddBoolVarCache(&NeckoCommonInternal::gSecurityDisabled,
"network.disable.ipc.security");
NeckoCommonInternal::gRegisteredBool = true;
}
return !NeckoCommonInternal::gSecurityDisabled;
}

View File

@ -76,6 +76,15 @@ NeckoParent::NeckoParent()
mObserver = new OfflineObserver(this);
gNeckoParent = this;
// only register once--we will have multiple NeckoParents if there are
// multiple child processes.
static bool registeredBool = false;
if (!registeredBool) {
Preferences::AddBoolVarCache(&NeckoCommonInternal::gSecurityDisabled,
"network.disable.ipc.security");
registeredBool = true;
}
}
NeckoParent::~NeckoParent()