diff --git a/accessible/xpcom/xpcAccessible.cpp b/accessible/xpcom/xpcAccessible.cpp index 30ff6a45a31..95580eda611 100644 --- a/accessible/xpcom/xpcAccessible.cpp +++ b/accessible/xpcom/xpcAccessible.cpp @@ -268,10 +268,17 @@ xpcAccessible::GetDescription(nsAString& aDescription) NS_IMETHODIMP xpcAccessible::GetLanguage(nsAString& aLanguage) { - if (!Intl()) + if (IntlGeneric().IsNull()) return NS_ERROR_FAILURE; - Intl()->Language(aLanguage); + nsAutoString lang; + if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) { + proxy->Language(lang); + } else { + Intl()->Language(lang); + } + + aLanguage.Assign(lang); return NS_OK; }