mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 17:16:12 +00:00
bug 199756 : Crash at nsDocument::GetPrincipal
This commit is contained in:
parent
a8882e7d5a
commit
559976ba5f
@ -873,8 +873,11 @@ NS_IMETHODIMP
|
||||
nsDocument::AddPrincipal(nsIPrincipal *aNewPrincipal)
|
||||
{
|
||||
nsresult rv;
|
||||
if (!mPrincipal)
|
||||
GetPrincipal(nsnull);
|
||||
if (!mPrincipal) {
|
||||
nsCOMPtr<nsIPrincipal> principal;
|
||||
rv = GetPrincipal(getter_AddRefs(principal));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIAggregatePrincipal> agg(do_QueryInterface(mPrincipal, &rv));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
|
Loading…
Reference in New Issue
Block a user