Bug 261339 Setting capability.policy.default.Window.top to noAccess seems to crash mozilla

r=caillon sr=dveditz
This commit is contained in:
timeless%mozdev.org 2004-11-05 16:54:09 +00:00
parent 37d49383e2
commit ffa869708f

View File

@ -918,6 +918,7 @@ nsScriptSecurityManager::LookupPolicy(nsIPrincipal* aPrincipal,
nsresult rv;
result->level = SCRIPT_SECURITY_UNDEFINED_ACCESS;
DomainPolicy* dpolicy = nsnull;
//-- Initialize policies if necessary
if (mPolicyPrefsChanged)
{
@ -925,9 +926,10 @@ nsScriptSecurityManager::LookupPolicy(nsIPrincipal* aPrincipal,
if (NS_FAILED(rv))
return rv;
}
DomainPolicy* dpolicy = nsnull;
aPrincipal->GetSecurityPolicy((void**)&dpolicy);
else
{
aPrincipal->GetSecurityPolicy((void**)&dpolicy);
}
if (!dpolicy && mOriginToPolicyMap)
{