Bug 320914 Firefox crashed with gnopernicus magnifier [@nsXULMenuitemAccessible::GetState]
r=aaronleventhal sr=roc git-svn-id: svn://10.0.0.236/trunk@186359 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -138,7 +138,6 @@ NS_IMETHODIMP nsXULButtonAccessible::GetState(PRUint32 *aState)
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
|
||||
NS_ASSERTION(element, "No nsIDOMElement for button node!");
|
||||
if (element) {
|
||||
PRBool isDefault = PR_FALSE;
|
||||
element->HasAttribute(NS_LITERAL_STRING("default"), &isDefault) ;
|
||||
|
||||
@@ -62,7 +62,8 @@ NS_IMETHODIMP nsXULMenuitemAccessible::GetState(PRUint32 *_retval)
|
||||
|
||||
// Focused?
|
||||
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
|
||||
NS_ASSERTION(element, "No DOM element for menu node!");
|
||||
if (!element)
|
||||
return NS_ERROR_FAILURE;
|
||||
PRBool isFocused = PR_FALSE;
|
||||
element->HasAttribute(NS_LITERAL_STRING("_moz-menuactive"), &isFocused);
|
||||
if (isFocused)
|
||||
@@ -111,7 +112,9 @@ NS_IMETHODIMP nsXULMenuitemAccessible::GetState(PRUint32 *_retval)
|
||||
NS_IMETHODIMP nsXULMenuitemAccessible::GetName(nsAString& _retval)
|
||||
{
|
||||
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
|
||||
NS_ASSERTION(element, "No DOM element for menu node!");
|
||||
if (!element) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
element->GetAttribute(NS_LITERAL_STRING("label"), _retval);
|
||||
|
||||
return NS_OK;
|
||||
|
||||
Reference in New Issue
Block a user