summaryrefslogtreecommitdiffstats
path: root/accessible/windows/msaa
diff options
context:
space:
mode:
Diffstat (limited to 'accessible/windows/msaa')
-rw-r--r--accessible/windows/msaa/AccessibleWrap.cpp96
-rw-r--r--accessible/windows/msaa/ApplicationAccessibleWrap.cpp16
-rw-r--r--accessible/windows/msaa/DocAccessibleWrap.cpp4
-rw-r--r--accessible/windows/msaa/EnumVariant.cpp16
-rw-r--r--accessible/windows/msaa/IUnknownImpl.cpp17
-rw-r--r--accessible/windows/msaa/IUnknownImpl.h24
6 files changed, 0 insertions, 173 deletions
diff --git a/accessible/windows/msaa/AccessibleWrap.cpp b/accessible/windows/msaa/AccessibleWrap.cpp
index 6112c370a..426270814 100644
--- a/accessible/windows/msaa/AccessibleWrap.cpp
+++ b/accessible/windows/msaa/AccessibleWrap.cpp
@@ -110,8 +110,6 @@ AccessibleWrap::Shutdown()
STDMETHODIMP
AccessibleWrap::QueryInterface(REFIID iid, void** ppv)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!ppv)
return E_INVALIDARG;
@@ -165,8 +163,6 @@ AccessibleWrap::QueryInterface(REFIID iid, void** ppv)
(reinterpret_cast<IUnknown*>(*ppv))->AddRef();
return S_OK;
-
- A11Y_TRYBLOCK_END
}
//-----------------------------------------------------
@@ -176,8 +172,6 @@ AccessibleWrap::QueryInterface(REFIID iid, void** ppv)
STDMETHODIMP
AccessibleWrap::get_accParent( IDispatch __RPC_FAR *__RPC_FAR *ppdispParent)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!ppdispParent)
return E_INVALIDARG;
@@ -208,15 +202,11 @@ AccessibleWrap::get_accParent( IDispatch __RPC_FAR *__RPC_FAR *ppdispParent)
*ppdispParent = NativeAccessible(xpParentAcc);
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
AccessibleWrap::get_accChildCount( long __RPC_FAR *pcountChildren)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!pcountChildren)
return E_INVALIDARG;
@@ -230,8 +220,6 @@ AccessibleWrap::get_accChildCount( long __RPC_FAR *pcountChildren)
*pcountChildren = ChildCount();
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
@@ -239,8 +227,6 @@ AccessibleWrap::get_accChild(
/* [in] */ VARIANT varChild,
/* [retval][out] */ IDispatch __RPC_FAR *__RPC_FAR *ppdispChild)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!ppdispChild)
return E_INVALIDARG;
@@ -265,8 +251,6 @@ AccessibleWrap::get_accChild(
child.forget(ppdispChild);
return S_OK;
-
- A11Y_TRYBLOCK_END
}
/**
@@ -331,8 +315,6 @@ AccessibleWrap::get_accName(
/* [optional][in] */ VARIANT varChild,
/* [retval][out] */ BSTR __RPC_FAR *pszName)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!pszName || varChild.vt != VT_I4)
return E_INVALIDARG;
@@ -361,8 +343,6 @@ AccessibleWrap::get_accName(
if (!*pszName)
return E_OUTOFMEMORY;
return S_OK;
-
- A11Y_TRYBLOCK_END
}
@@ -371,8 +351,6 @@ AccessibleWrap::get_accValue(
/* [optional][in] */ VARIANT varChild,
/* [retval][out] */ BSTR __RPC_FAR *pszValue)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!pszValue)
return E_INVALIDARG;
@@ -401,16 +379,12 @@ AccessibleWrap::get_accValue(
if (!*pszValue)
return E_OUTOFMEMORY;
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
AccessibleWrap::get_accDescription(VARIANT varChild,
BSTR __RPC_FAR *pszDescription)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!pszDescription)
return E_INVALIDARG;
@@ -432,8 +406,6 @@ AccessibleWrap::get_accDescription(VARIANT varChild,
*pszDescription = ::SysAllocStringLen(description.get(),
description.Length());
return *pszDescription ? S_OK : E_OUTOFMEMORY;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
@@ -441,8 +413,6 @@ AccessibleWrap::get_accRole(
/* [optional][in] */ VARIANT varChild,
/* [retval][out] */ VARIANT __RPC_FAR *pvarRole)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!pvarRole)
return E_INVALIDARG;
@@ -532,8 +502,6 @@ AccessibleWrap::get_accRole(
}
return E_FAIL;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
@@ -541,8 +509,6 @@ AccessibleWrap::get_accState(
/* [optional][in] */ VARIANT varChild,
/* [retval][out] */ VARIANT __RPC_FAR *pvarState)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!pvarState)
return E_INVALIDARG;
@@ -574,8 +540,6 @@ AccessibleWrap::get_accState(
nsAccUtils::To32States(state, &msaaState, nullptr);
pvarState->lVal = msaaState;
return S_OK;
-
- A11Y_TRYBLOCK_END
}
@@ -584,15 +548,11 @@ AccessibleWrap::get_accHelp(
/* [optional][in] */ VARIANT varChild,
/* [retval][out] */ BSTR __RPC_FAR *pszHelp)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!pszHelp)
return E_INVALIDARG;
*pszHelp = nullptr;
return S_FALSE;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
@@ -601,16 +561,12 @@ AccessibleWrap::get_accHelpTopic(
/* [optional][in] */ VARIANT varChild,
/* [retval][out] */ long __RPC_FAR *pidTopic)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!pszHelpFile || !pidTopic)
return E_INVALIDARG;
*pszHelpFile = nullptr;
*pidTopic = 0;
return S_FALSE;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
@@ -618,8 +574,6 @@ AccessibleWrap::get_accKeyboardShortcut(
/* [optional][in] */ VARIANT varChild,
/* [retval][out] */ BSTR __RPC_FAR *pszKeyboardShortcut)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!pszKeyboardShortcut)
return E_INVALIDARG;
*pszKeyboardShortcut = nullptr;
@@ -645,16 +599,12 @@ AccessibleWrap::get_accKeyboardShortcut(
*pszKeyboardShortcut = ::SysAllocStringLen(shortcut.get(),
shortcut.Length());
return *pszKeyboardShortcut ? S_OK : E_OUTOFMEMORY;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
AccessibleWrap::get_accFocus(
/* [retval][out] */ VARIANT __RPC_FAR *pvarChild)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!pvarChild)
return E_INVALIDARG;
@@ -685,8 +635,6 @@ AccessibleWrap::get_accFocus(
}
return S_OK;
-
- A11Y_TRYBLOCK_END
}
/**
@@ -723,8 +671,6 @@ private:
STDMETHODIMP
AccessibleEnumerator::QueryInterface(REFIID iid, void ** ppvObject)
{
- A11Y_TRYBLOCK_BEGIN
-
if (iid == IID_IEnumVARIANT) {
*ppvObject = static_cast<IEnumVARIANT*>(this);
AddRef();
@@ -738,15 +684,11 @@ AccessibleEnumerator::QueryInterface(REFIID iid, void ** ppvObject)
*ppvObject = nullptr;
return E_NOINTERFACE;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
AccessibleEnumerator::Next(unsigned long celt, VARIANT FAR* rgvar, unsigned long FAR* pceltFetched)
{
- A11Y_TRYBLOCK_BEGIN
-
uint32_t length = mArray.Length();
HRESULT hr = S_OK;
@@ -766,29 +708,21 @@ AccessibleEnumerator::Next(unsigned long celt, VARIANT FAR* rgvar, unsigned long
*pceltFetched = celt;
return hr;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
AccessibleEnumerator::Clone(IEnumVARIANT FAR* FAR* ppenum)
{
- A11Y_TRYBLOCK_BEGIN
-
*ppenum = new AccessibleEnumerator(*this);
if (!*ppenum)
return E_OUTOFMEMORY;
NS_ADDREF(*ppenum);
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
AccessibleEnumerator::Skip(unsigned long celt)
{
- A11Y_TRYBLOCK_BEGIN
-
uint32_t length = mArray.Length();
// Check if we can skip the requested number of elements
if (celt > length - mCurIndex) {
@@ -797,8 +731,6 @@ AccessibleEnumerator::Skip(unsigned long celt)
}
mCurIndex += celt;
return S_OK;
-
- A11Y_TRYBLOCK_END
}
/**
@@ -821,8 +753,6 @@ AccessibleEnumerator::Skip(unsigned long celt)
STDMETHODIMP
AccessibleWrap::get_accSelection(VARIANT __RPC_FAR *pvarChildren)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!pvarChildren)
return E_INVALIDARG;
@@ -842,8 +772,6 @@ AccessibleWrap::get_accSelection(VARIANT __RPC_FAR *pvarChildren)
NS_ADDREF(pvarChildren->punkVal = pEnum);
}
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
@@ -851,8 +779,6 @@ AccessibleWrap::get_accDefaultAction(
/* [optional][in] */ VARIANT varChild,
/* [retval][out] */ BSTR __RPC_FAR *pszDefaultAction)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!pszDefaultAction)
return E_INVALIDARG;
@@ -874,8 +800,6 @@ AccessibleWrap::get_accDefaultAction(
*pszDefaultAction = ::SysAllocStringLen(defaultAction.get(),
defaultAction.Length());
return *pszDefaultAction ? S_OK : E_OUTOFMEMORY;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
@@ -883,8 +807,6 @@ AccessibleWrap::accSelect(
/* [in] */ long flagsSelect,
/* [optional][in] */ VARIANT varChild)
{
- A11Y_TRYBLOCK_BEGIN
-
RefPtr<IAccessible> accessible;
HRESULT hr = ResolveChild(varChild, getter_AddRefs(accessible));
if (FAILED(hr)) {
@@ -926,8 +848,6 @@ AccessibleWrap::accSelect(
}
return E_FAIL;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
@@ -938,8 +858,6 @@ AccessibleWrap::accLocation(
/* [out] */ long __RPC_FAR *pcyHeight,
/* [optional][in] */ VARIANT varChild)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!pxLeft || !pyTop || !pcxWidth || !pcyHeight)
return E_INVALIDARG;
@@ -966,8 +884,6 @@ AccessibleWrap::accLocation(
*pcxWidth = rect.width;
*pcyHeight = rect.height;
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
@@ -976,8 +892,6 @@ AccessibleWrap::accNavigate(
/* [optional][in] */ VARIANT varStart,
/* [retval][out] */ VARIANT __RPC_FAR *pvarEndUpAt)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!pvarEndUpAt)
return E_INVALIDARG;
@@ -1060,8 +974,6 @@ AccessibleWrap::accNavigate(
pvarEndUpAt->pdispVal = NativeAccessible(navAccessible);
pvarEndUpAt->vt = VT_DISPATCH;
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
@@ -1070,8 +982,6 @@ AccessibleWrap::accHitTest(
/* [in] */ long yTop,
/* [retval][out] */ VARIANT __RPC_FAR *pvarChild)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!pvarChild)
return E_INVALIDARG;
@@ -1098,16 +1008,12 @@ AccessibleWrap::accHitTest(
return S_FALSE;
}
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
AccessibleWrap::accDoDefaultAction(
/* [optional][in] */ VARIANT varChild)
{
- A11Y_TRYBLOCK_BEGIN
-
RefPtr<IAccessible> accessible;
HRESULT hr = ResolveChild(varChild, getter_AddRefs(accessible));
if (FAILED(hr)) {
@@ -1119,8 +1025,6 @@ AccessibleWrap::accDoDefaultAction(
}
return DoAction(0) ? S_OK : E_INVALIDARG;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
diff --git a/accessible/windows/msaa/ApplicationAccessibleWrap.cpp b/accessible/windows/msaa/ApplicationAccessibleWrap.cpp
index b78a8dd55..ec9d511e4 100644
--- a/accessible/windows/msaa/ApplicationAccessibleWrap.cpp
+++ b/accessible/windows/msaa/ApplicationAccessibleWrap.cpp
@@ -69,8 +69,6 @@ ApplicationAccessibleWrap::QueryInterface(REFIID iid, void** ppv)
STDMETHODIMP
ApplicationAccessibleWrap::get_appName(BSTR* aName)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aName)
return E_INVALIDARG;
@@ -86,15 +84,11 @@ ApplicationAccessibleWrap::get_appName(BSTR* aName)
*aName = ::SysAllocStringLen(name.get(), name.Length());
return *aName ? S_OK : E_OUTOFMEMORY;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
ApplicationAccessibleWrap::get_appVersion(BSTR* aVersion)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aVersion)
return E_INVALIDARG;
@@ -110,15 +104,11 @@ ApplicationAccessibleWrap::get_appVersion(BSTR* aVersion)
*aVersion = ::SysAllocStringLen(version.get(), version.Length());
return *aVersion ? S_OK : E_OUTOFMEMORY;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
ApplicationAccessibleWrap::get_toolkitName(BSTR* aName)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aName)
return E_INVALIDARG;
@@ -132,15 +122,11 @@ ApplicationAccessibleWrap::get_toolkitName(BSTR* aName)
*aName = ::SysAllocStringLen(name.get(), name.Length());
return *aName ? S_OK : E_OUTOFMEMORY;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
ApplicationAccessibleWrap::get_toolkitVersion(BSTR* aVersion)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aVersion)
return E_INVALIDARG;
@@ -156,7 +142,5 @@ ApplicationAccessibleWrap::get_toolkitVersion(BSTR* aVersion)
*aVersion = ::SysAllocStringLen(version.get(), version.Length());
return *aVersion ? S_OK : E_OUTOFMEMORY;
-
- A11Y_TRYBLOCK_END
}
diff --git a/accessible/windows/msaa/DocAccessibleWrap.cpp b/accessible/windows/msaa/DocAccessibleWrap.cpp
index 6fb89816d..895fe9192 100644
--- a/accessible/windows/msaa/DocAccessibleWrap.cpp
+++ b/accessible/windows/msaa/DocAccessibleWrap.cpp
@@ -65,8 +65,6 @@ DocAccessibleWrap::get_accParent(
STDMETHODIMP
DocAccessibleWrap::get_accValue(VARIANT aVarChild, BSTR __RPC_FAR* aValue)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aValue)
return E_INVALIDARG;
*aValue = nullptr;
@@ -90,8 +88,6 @@ DocAccessibleWrap::get_accValue(VARIANT aVarChild, BSTR __RPC_FAR* aValue)
*aValue = ::SysAllocStringLen(url.get(), url.Length());
return *aValue ? S_OK : E_OUTOFMEMORY;
-
- A11Y_TRYBLOCK_END
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/accessible/windows/msaa/EnumVariant.cpp b/accessible/windows/msaa/EnumVariant.cpp
index 86c81a105..2344208a3 100644
--- a/accessible/windows/msaa/EnumVariant.cpp
+++ b/accessible/windows/msaa/EnumVariant.cpp
@@ -21,8 +21,6 @@ STDMETHODIMP
ChildrenEnumVariant::Next(ULONG aCount, VARIANT FAR* aItems,
ULONG FAR* aCountFetched)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aItems || !aCountFetched)
return E_INVALIDARG;
@@ -55,15 +53,11 @@ ChildrenEnumVariant::Next(ULONG aCount, VARIANT FAR* aItems,
(*aCountFetched) = countFetched;
return countFetched < aCount ? S_FALSE : S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
ChildrenEnumVariant::Skip(ULONG aCount)
{
- A11Y_TRYBLOCK_BEGIN
-
if (mAnchorAcc->IsDefunct() || mAnchorAcc->GetChildAt(mCurIndex) != mCurAcc)
return CO_E_OBJNOTCONNECTED;
@@ -71,15 +65,11 @@ ChildrenEnumVariant::Skip(ULONG aCount)
mCurAcc = mAnchorAcc->GetChildAt(mCurIndex);
return mCurAcc ? S_OK : S_FALSE;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
ChildrenEnumVariant::Reset()
{
- A11Y_TRYBLOCK_BEGIN
-
if (mAnchorAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@@ -87,15 +77,11 @@ ChildrenEnumVariant::Reset()
mCurAcc = mAnchorAcc->GetChildAt(0);
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
ChildrenEnumVariant::Clone(IEnumVARIANT** aEnumVariant)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aEnumVariant)
return E_INVALIDARG;
@@ -103,6 +89,4 @@ ChildrenEnumVariant::Clone(IEnumVARIANT** aEnumVariant)
(*aEnumVariant)->AddRef();
return S_OK;
-
- A11Y_TRYBLOCK_END
}
diff --git a/accessible/windows/msaa/IUnknownImpl.cpp b/accessible/windows/msaa/IUnknownImpl.cpp
index 4a9fa5383..c74f86e33 100644
--- a/accessible/windows/msaa/IUnknownImpl.cpp
+++ b/accessible/windows/msaa/IUnknownImpl.cpp
@@ -37,22 +37,5 @@ GetHRESULT(nsresult aResult)
}
}
-int
-FilterExceptions(unsigned int aCode, EXCEPTION_POINTERS* aExceptionInfo)
-{
- if (aCode == EXCEPTION_ACCESS_VIOLATION) {
-#ifdef MOZ_CRASHREPORTER
- // MSAA swallows crashes (because it is COM-based) but we still need to
- // learn about those crashes so we can fix them. Make sure to pass them to
- // the crash reporter.
- CrashReporter::WriteMinidumpForException(aExceptionInfo);
-#endif
- } else {
- NS_NOTREACHED("We should only be catching crash exceptions");
- }
-
- return EXCEPTION_CONTINUE_SEARCH;
-}
-
} // namespace a11y
} // namespace mozilla
diff --git a/accessible/windows/msaa/IUnknownImpl.h b/accessible/windows/msaa/IUnknownImpl.h
index dbf6c1374..d939a4dfa 100644
--- a/accessible/windows/msaa/IUnknownImpl.h
+++ b/accessible/windows/msaa/IUnknownImpl.h
@@ -79,7 +79,6 @@ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, void**); \
STDMETHODIMP \
Class::QueryInterface(REFIID aIID, void** aInstancePtr) \
{ \
- A11Y_TRYBLOCK_BEGIN \
if (!aInstancePtr) \
return E_INVALIDARG; \
*aInstancePtr = nullptr; \
@@ -88,17 +87,14 @@ Class::QueryInterface(REFIID aIID, void** aInstancePtr) \
#define IMPL_IUNKNOWN_QUERY_TAIL \
return hr; \
- A11Y_TRYBLOCK_END \
}
#define IMPL_IUNKNOWN_QUERY_TAIL_AGGREGATED(Member) \
return Member->QueryInterface(aIID, aInstancePtr); \
- A11Y_TRYBLOCK_END \
}
#define IMPL_IUNKNOWN_QUERY_TAIL_INHERITED(BaseClass) \
return BaseClass::QueryInterface(aIID, aInstancePtr); \
- A11Y_TRYBLOCK_END \
}
#define IMPL_IUNKNOWN_QUERY_IFACE(Iface) \
@@ -158,21 +154,6 @@ Class::QueryInterface(REFIID aIID, void** aInstancePtr) \
IMPL_IUNKNOWN_QUERY_CLASS(Super2); \
IMPL_IUNKNOWN_QUERY_TAIL_INHERITED(Super0)
-
-/**
- * Wrap every method body by these macroses to pass exception to the crash
- * reporter.
- */
-#define A11Y_TRYBLOCK_BEGIN \
- MOZ_SEH_TRY {
-
-#define A11Y_TRYBLOCK_END \
- } MOZ_SEH_EXCEPT(mozilla::a11y::FilterExceptions(::GetExceptionCode(), \
- GetExceptionInformation())) \
- { } \
- return E_FAIL;
-
-
namespace mozilla {
namespace a11y {
@@ -181,11 +162,6 @@ namespace a11y {
*/
HRESULT GetHRESULT(nsresult aResult);
-/**
- * Used to pass an exception to the crash reporter.
- */
-int FilterExceptions(unsigned int aCode, EXCEPTION_POINTERS* aExceptionInfo);
-
} // namespace a11y;
} //namespace mozilla;