зеркало из https://github.com/mozilla/pjs.git
bug 199756 : Crash at nsDocument::GetPrincipal
This commit is contained in:
Родитель
9e16916a56
Коммит
71085bc721
|
@ -873,8 +873,11 @@ NS_IMETHODIMP
|
||||||
nsDocument::AddPrincipal(nsIPrincipal *aNewPrincipal)
|
nsDocument::AddPrincipal(nsIPrincipal *aNewPrincipal)
|
||||||
{
|
{
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
if (!mPrincipal)
|
if (!mPrincipal) {
|
||||||
GetPrincipal(nsnull);
|
nsCOMPtr<nsIPrincipal> principal;
|
||||||
|
rv = GetPrincipal(getter_AddRefs(principal));
|
||||||
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
}
|
||||||
|
|
||||||
nsCOMPtr<nsIAggregatePrincipal> agg(do_QueryInterface(mPrincipal, &rv));
|
nsCOMPtr<nsIAggregatePrincipal> agg(do_QueryInterface(mPrincipal, &rv));
|
||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv)) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче