Bug 358720, Crash [@ nsAccessibilityService::GetAccessible], r=aaronl, sr=neil

This commit is contained in:
Olli.Pettay%helsinki.fi 2006-11-01 08:30:01 +00:00
Родитель 12192625ce
Коммит dddd41fe11
1 изменённых файлов: 6 добавлений и 1 удалений

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

@ -1067,7 +1067,10 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
PRBool *aIsHidden,
nsIAccessible **aAccessible)
{
NS_ENSURE_ARG_POINTER(aAccessible);
NS_ENSURE_ARG_POINTER(aFrameHint);
*aAccessible = nsnull;
*aFrameHint = nsnull;
if (!aPresShell || !aWeakShell) {
return NS_ERROR_FAILURE;
}
@ -1135,9 +1138,11 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
}
else {
CreateRootAccessible(aPresShell, nodeIsDoc, getter_AddRefs(newAcc)); // Does Init() for us
NS_ASSERTION(newAcc, "No root/doc accessible created");
NS_WARN_IF_FALSE(newAcc, "No root/doc accessible created");
}
NS_ENSURE_STATE(newAcc);
*aFrameHint = aPresShell->GetRootFrame();
NS_ADDREF(*aAccessible = newAcc );
return NS_OK;