Bug 1409916: Eliminate pointless cross-process call for IAccessible2_2::get_attribute. r?aklotz
IAccessible2_2::get_attribute is not implemented yet in Gecko.
However, the handler still passes this through, thus resulting in a pointless cross-process call.
Instead, just return E_NOTIMPL in the handler for this method.
MozReview-Commit-ID: 5XHieUC4cuz
--- a/accessible/ipc/win/handler/AccessibleHandler.cpp
+++ b/accessible/ipc/win/handler/AccessibleHandler.cpp
@@ -977,23 +977,21 @@ AccessibleHandler::get_attributes(BSTR*
BEGIN_CACHE_ACCESS;
GET_BSTR(mAttributes, *attributes);
return S_OK;
}
HRESULT
AccessibleHandler::get_attribute(BSTR name, VARIANT* attribute)
{
- // We could extract these individually from cached mAttributes.
- // Consider it if traffic warrants it
- HRESULT hr = ResolveIA2();
- if (FAILED(hr)) {
- return hr;
- }
- return mIA2PassThru->get_attribute(name, attribute);
+ // Not yet implemented by ia2Accessible.
+ // Once ia2Accessible implements this, we could either pass it through
+ // or we could extract these individually from cached mAttributes.
+ // The latter should be considered if traffic warrants it.
+ return E_NOTIMPL;
}
HRESULT
AccessibleHandler::get_accessibleWithCaret(IUnknown** accessible,
long* caretOffset)
{
HRESULT hr = ResolveIA2();
if (FAILED(hr)) {