bug 1250882 - implement xpcAccessible::Name() for proxied accessibles r=davidb

This commit is contained in:
Trevor Saunders 2016-02-10 17:46:07 -05:00
parent 75a8c74522
commit 39b0307bf1

View File

@ -232,11 +232,16 @@ xpcAccessible::GetName(nsAString& aName)
{ {
aName.Truncate(); aName.Truncate();
if (!Intl()) if (IntlGeneric().IsNull())
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
nsAutoString name; nsAutoString name;
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
proxy->Name(name);
} else {
Intl()->Name(name); Intl()->Name(name);
}
aName.Assign(name); aName.Assign(name);
return NS_OK; return NS_OK;