Null out members in Shutdown() so we bail out of later API calls with an error. b=381057 r=aaronleventhal

This commit is contained in:
mats.palmgren%bredband.net 2007-05-20 08:05:28 +00:00
Родитель 053d357f4c
Коммит 25ac15d174
1 изменённых файлов: 6 добавлений и 2 удалений

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

@ -225,6 +225,9 @@ NS_IMETHODIMP nsXULTreeAccessible::GetValue(nsAString& _retval)
NS_IMETHODIMP nsXULTreeAccessible::Shutdown()
{
mTree = nsnull;
mTreeView = nsnull;
nsXULSelectableAccessible::Shutdown();
if (mAccessNodeCache) {
@ -232,6 +235,7 @@ NS_IMETHODIMP nsXULTreeAccessible::Shutdown()
delete mAccessNodeCache;
mAccessNodeCache = nsnull;
}
return NS_OK;
}
@ -600,8 +604,8 @@ nsXULTreeitemAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
mTreeView->IsContainerEmpty(mRow, &isContainerEmpty);
if (!isContainerEmpty) {
mTreeView->IsContainerOpen(mRow, &isContainerOpen);
*aState |= isContainerOpen? nsIAccessibleStates::STATE_EXPANDED:
nsIAccessibleStates::STATE_COLLAPSED;
*aState |= isContainerOpen? PRUint32(nsIAccessibleStates::STATE_EXPANDED):
PRUint32(nsIAccessibleStates::STATE_COLLAPSED);
}
}