summaryrefslogtreecommitdiffstats
path: root/accessible/windows/msaa/AccessibleWrap.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-02-19 13:46:04 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-02-19 13:46:04 +0100
commit616475a0c1109460fe42045ca3380f4d8f0752cd (patch)
treef28d81584e97fa7b988cef20969cc6046a00c62a /accessible/windows/msaa/AccessibleWrap.cpp
parenta14048f0a23b0e50576ab3b5e87aebd616b35d43 (diff)
downloadUXP-616475a0c1109460fe42045ca3380f4d8f0752cd.tar
UXP-616475a0c1109460fe42045ca3380f4d8f0752cd.tar.gz
UXP-616475a0c1109460fe42045ca3380f4d8f0752cd.tar.lz
UXP-616475a0c1109460fe42045ca3380f4d8f0752cd.tar.xz
UXP-616475a0c1109460fe42045ca3380f4d8f0752cd.zip
Remove SEH try blocks from a11y code.
Diffstat (limited to 'accessible/windows/msaa/AccessibleWrap.cpp')
-rw-r--r--accessible/windows/msaa/AccessibleWrap.cpp96
1 files changed, 0 insertions, 96 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