Bug 706784 - Firefox 8.0.1 Crash Report [@ nsLinkableAccessible::GetValue(nsAString_internal&) ], r=marcoz

This commit is contained in:
Alexander Surkov 2011-12-02 00:11:53 +08:00
Родитель 0df5edb374
Коммит af2c5b6a31
1 изменённых файлов: 17 добавлений и 14 удалений

Просмотреть файл

@ -312,22 +312,25 @@ STDMETHODIMP nsAccessibleWrap::get_accValue(
{
__try {
*pszValue = NULL;
nsAccessible *xpAccessible = GetXPAccessibleFor(varChild);
if (xpAccessible) {
nsAutoString value;
if (NS_FAILED(xpAccessible->GetValue(value)))
return E_FAIL;
// see bug 438784: Need to expose URL on doc's value attribute.
// For this, reverting part of fix for bug 425693 to make this MSAA method
// behave IAccessible2-style.
if (value.IsEmpty())
return S_FALSE;
nsAccessible* xpAccessible = GetXPAccessibleFor(varChild);
if (!xpAccessible || xpAccessible->IsDefunct())
return E_FAIL;
nsAutoString value;
if (NS_FAILED(xpAccessible->GetValue(value)))
return E_FAIL;
// See bug 438784: need to expose URL on doc's value attribute. For this,
// reverting part of fix for bug 425693 to make this MSAA method behave
// IAccessible2-style.
if (value.IsEmpty())
return S_FALSE;
*pszValue = ::SysAllocStringLen(value.get(), value.Length());
if (!*pszValue)
return E_OUTOFMEMORY;
*pszValue = ::SysAllocStringLen(value.get(), value.Length());
if (!*pszValue)
return E_OUTOFMEMORY;
}
} __except(FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
return S_OK;
}