mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 169036: Fix potential crasher by adding a nullcheck.
r=jrgm sr=jst a=dbaron
This commit is contained in:
parent
04624a2df0
commit
3ea21f2ffc
@ -486,6 +486,10 @@ nsXULDocument::~nsXULDocument()
|
||||
mScriptLoader->DropDocumentReference();
|
||||
}
|
||||
|
||||
if (mNodeInfoManager) {
|
||||
mNodeInfoManager->DropDocumentReference();
|
||||
}
|
||||
|
||||
delete mTemplateBuilderTable;
|
||||
delete mBoxObjectTable;
|
||||
|
||||
@ -513,11 +517,6 @@ nsXULDocument::~nsXULDocument()
|
||||
NS_RELEASE(gXULCache);
|
||||
}
|
||||
}
|
||||
|
||||
if (mNodeInfoManager) {
|
||||
mNodeInfoManager->DropDocumentReference();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -808,6 +807,10 @@ nsXULDocument::GetDocumentURL(nsIURI** aURI) const
|
||||
NS_IMETHODIMP
|
||||
nsXULDocument::GetPrincipal(nsIPrincipal **aPrincipal)
|
||||
{
|
||||
*aPrincipal = nsnull;
|
||||
NS_ASSERTION(mMasterPrototype, "Missing master prototype. See bug 169036");
|
||||
NS_ENSURE_TRUE(mMasterPrototype, NS_ERROR_UNEXPECTED);
|
||||
|
||||
return mMasterPrototype->GetDocumentPrincipal(aPrincipal);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user