зеркало из https://github.com/mozilla/pjs.git
When getting a TreeOwner that is null, make sure we don't crash trying to call QueryInterface on it when grabbing the nsIBaseWindow interface. r=saari
This commit is contained in:
Родитель
99594f57e8
Коммит
721c8092d1
|
@ -3247,6 +3247,11 @@ NS_IMETHODIMP GlobalWindowImpl::GetTreeOwner(nsIBaseWindow** aTreeOwner)
|
|||
|
||||
nsCOMPtr<nsIDocShellTreeOwner> treeOwner;
|
||||
docShellAsItem->GetTreeOwner(getter_AddRefs(treeOwner));
|
||||
if(!treeOwner)
|
||||
{
|
||||
*aTreeOwner = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return CallQueryInterface(treeOwner, aTreeOwner);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче