From 25ac15d17431434eafc5f7eaae3e901a060d9645 Mon Sep 17 00:00:00 2001 From: "mats.palmgren%bredband.net" Date: Sun, 20 May 2007 08:05:28 +0000 Subject: [PATCH] Null out members in Shutdown() so we bail out of later API calls with an error. b=381057 r=aaronleventhal --- accessible/src/xul/nsXULTreeAccessible.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/accessible/src/xul/nsXULTreeAccessible.cpp b/accessible/src/xul/nsXULTreeAccessible.cpp index ebdc4a972e1..f72a7b65567 100644 --- a/accessible/src/xul/nsXULTreeAccessible.cpp +++ b/accessible/src/xul/nsXULTreeAccessible.cpp @@ -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); } }