Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj
This commit is contained in:
@@ -1285,7 +1285,7 @@ nsScriptSecurityManager::~nsScriptSecurityManager(void)
|
||||
// ContentChild might hold a reference to the domain policy,
|
||||
// and it might release it only after the security manager is
|
||||
// gone. But we can still assert this for the main process.
|
||||
MOZ_ASSERT_IF(XRE_GetProcessType() == GeckoProcessType_Default,
|
||||
MOZ_ASSERT_IF(XRE_IsParentProcess(),
|
||||
!mDomainPolicy);
|
||||
}
|
||||
|
||||
@@ -1502,7 +1502,7 @@ nsScriptSecurityManager::GetDomainPolicyActive(bool *aRv)
|
||||
NS_IMETHODIMP
|
||||
nsScriptSecurityManager::ActivateDomainPolicy(nsIDomainPolicy** aRv)
|
||||
{
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
if (!XRE_IsParentProcess()) {
|
||||
return NS_ERROR_SERVICE_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user