Bug 529192 - crash [nsXULListCellAccessible::GetAttributesInternal(nsIPersistentProperties*)] r=MarcoZ,surkov

This commit is contained in:
David Bolter 2009-11-17 16:14:45 -05:00
parent 532b61f5f0
commit 2ef981ab22

View File

@ -1157,8 +1157,7 @@ nsXULListCellAccessible::GetColumnHeaderCells(nsIArray **aHeaderCells)
nsCOMPtr<nsIAccessibleTable> table;
GetTable(getter_AddRefs(table));
if (!table)
return NS_OK;
NS_ENSURE_STATE(table); // we expect to be in a listbox (table)
// Get column header cell from XUL listhead.
nsCOMPtr<nsIAccessible> tableAcc(do_QueryInterface(table));
@ -1209,8 +1208,7 @@ nsXULListCellAccessible::GetRowHeaderCells(nsIArray **aHeaderCells)
nsCOMPtr<nsIAccessibleTable> table;
GetTable(getter_AddRefs(table));
if (!table)
return NS_OK;
NS_ENSURE_STATE(table); // we expect to be in a listbox (table)
// Calculate row header cells from ARIA markup.
return nsAccUtils::GetHeaderCellsFor(table, this,
@ -1229,8 +1227,7 @@ nsXULListCellAccessible::IsSelected(PRBool *aIsSelected)
nsCOMPtr<nsIAccessibleTable> table;
GetTable(getter_AddRefs(table));
if (!table)
return NS_OK;
NS_ENSURE_STATE(table); // we expect to be in a listbox (table)
PRInt32 rowIdx = -1;
GetRowIndex(&rowIdx);
@ -1259,6 +1256,7 @@ nsXULListCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAttribu
// "table-cell-index" attribute
nsCOMPtr<nsIAccessibleTable> table;
GetTable(getter_AddRefs(table));
NS_ENSURE_STATE(table); // we expect to be in a listbox (table)
PRInt32 rowIdx = -1;
GetRowIndex(&rowIdx);