Always throw an exception, even if we cannot reach a principal. bug 409514, r+sr+a=jst

This commit is contained in:
mrbkap%gmail.com 2008-01-05 01:32:23 +00:00
Родитель 0ae51631c7
Коммит 6ad5c57e2d
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -800,7 +800,7 @@ nsScriptSecurityManager::CheckPropertyAccessImpl(PRUint32 aAction,
{
objectPrincipal = doGetObjectPrincipal(cx, aJSObject);
if (!objectPrincipal)
return NS_ERROR_FAILURE;
rv = NS_ERROR_DOM_SECURITY_ERR;
}
else if(aTargetURI)
{
@ -813,8 +813,9 @@ nsScriptSecurityManager::CheckPropertyAccessImpl(PRUint32 aAction,
NS_ERROR("CheckPropertyAccessImpl called without a target object or URL");
return NS_ERROR_FAILURE;
}
rv = CheckSameOriginDOMProp(subjectPrincipal, objectPrincipal,
aAction, aTargetURI != nsnull);
if(NS_SUCCEEDED(rv))
rv = CheckSameOriginDOMProp(subjectPrincipal, objectPrincipal,
aAction, aTargetURI != nsnull);
break;
}
default: