Bug 377800. Too many warnings for accessibility in console. r=surkov

This commit is contained in:
aaronleventhal@moonset.net 2007-04-18 06:40:52 -07:00
parent d114bf0dbe
commit 8ac87b81e6
2 changed files with 6 additions and 2 deletions

View File

@ -1001,7 +1001,9 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessibleInWeakShell(nsIDOMNode *aNode
nsresult nsAccessibilityService::InitAccessible(nsIAccessible *aAccessibleIn,
nsIAccessible **aAccessibleOut)
{
NS_ENSURE_TRUE(aAccessibleIn, NS_ERROR_FAILURE);
if (!aAccessibleIn) {
return NS_ERROR_FAILURE; // No accessible to init
}
NS_ASSERTION(aAccessibleOut && !*aAccessibleOut, "Out param should already be cleared out");
nsCOMPtr<nsPIAccessNode> privateAccessNode = do_QueryInterface(aAccessibleIn);

View File

@ -992,7 +992,9 @@ nsAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
}
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
NS_ENSURE_TRUE(content, NS_ERROR_FAILURE);
if (!content) {
return NS_OK; // On document, this is not an error
}
// Set STATE_UNAVAILABLE state based on disabled attribute
// The disabled attribute is mostly used in XUL elements and HTML forms, but