summaryrefslogtreecommitdiffstats
path: root/accessible/windows/sdn
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/sdn
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/sdn')
-rw-r--r--accessible/windows/sdn/sdnAccessible.cpp64
-rw-r--r--accessible/windows/sdn/sdnDocAccessible.cpp24
-rw-r--r--accessible/windows/sdn/sdnTextAccessible.cpp20
3 files changed, 0 insertions, 108 deletions
diff --git a/accessible/windows/sdn/sdnAccessible.cpp b/accessible/windows/sdn/sdnAccessible.cpp
index 909b0779c..d90631c8f 100644
--- a/accessible/windows/sdn/sdnAccessible.cpp
+++ b/accessible/windows/sdn/sdnAccessible.cpp
@@ -28,8 +28,6 @@ using namespace mozilla::a11y;
STDMETHODIMP
sdnAccessible::QueryInterface(REFIID aREFIID, void** aInstancePtr)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aInstancePtr)
return E_FAIL;
*aInstancePtr = nullptr;
@@ -53,8 +51,6 @@ sdnAccessible::QueryInterface(REFIID aREFIID, void** aInstancePtr)
}
return E_NOINTERFACE;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
@@ -65,8 +61,6 @@ sdnAccessible::get_nodeInfo(BSTR __RPC_FAR* aNodeName,
unsigned int __RPC_FAR* aUniqueID,
unsigned short __RPC_FAR* aNodeType)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aNodeName || !aNameSpaceID || !aNodeValue || !aNumChildren ||
!aUniqueID || !aNodeType)
return E_INVALIDARG;
@@ -114,8 +108,6 @@ sdnAccessible::get_nodeInfo(BSTR __RPC_FAR* aNodeName,
*aNumChildren = mNode->GetChildCount();
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
@@ -125,8 +117,6 @@ sdnAccessible::get_attributes(unsigned short aMaxAttribs,
BSTR __RPC_FAR* aAttribValues,
unsigned short __RPC_FAR* aNumAttribs)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aAttribNames || !aNameSpaceIDs || !aAttribValues || !aNumAttribs)
return E_INVALIDARG;
@@ -159,8 +149,6 @@ sdnAccessible::get_attributes(unsigned short aMaxAttribs,
}
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
@@ -169,8 +157,6 @@ sdnAccessible::get_attributesForNames(unsigned short aMaxAttribs,
short __RPC_FAR* aNameSpaceID,
BSTR __RPC_FAR* aAttribValues)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aAttribNames || !aNameSpaceID || !aAttribValues)
return E_INVALIDARG;
@@ -207,8 +193,6 @@ sdnAccessible::get_attributesForNames(unsigned short aMaxAttribs,
}
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
@@ -218,8 +202,6 @@ sdnAccessible::get_computedStyle(unsigned short aMaxStyleProperties,
BSTR __RPC_FAR* aStyleValues,
unsigned short __RPC_FAR* aNumStyleProperties)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aStyleProperties || aStyleValues || !aNumStyleProperties)
return E_INVALIDARG;
@@ -257,8 +239,6 @@ sdnAccessible::get_computedStyle(unsigned short aMaxStyleProperties,
*aNumStyleProperties = static_cast<unsigned short>(realIndex);
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
@@ -267,8 +247,6 @@ sdnAccessible::get_computedStyleForProperties(unsigned short aNumStyleProperties
BSTR __RPC_FAR* aStyleProperties,
BSTR __RPC_FAR* aStyleValues)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aStyleProperties || !aStyleValues)
return E_INVALIDARG;
@@ -291,15 +269,11 @@ sdnAccessible::get_computedStyleForProperties(unsigned short aNumStyleProperties
}
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
sdnAccessible::scrollTo(boolean aScrollTopLeft)
{
- A11Y_TRYBLOCK_BEGIN
-
DocAccessible* document = GetDocument();
if (!document) // that's IsDefunct check
return CO_E_OBJNOTCONNECTED;
@@ -313,15 +287,11 @@ sdnAccessible::scrollTo(boolean aScrollTopLeft)
nsCoreUtils::ScrollTo(document->PresShell(), mNode->AsContent(), scrollType);
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
sdnAccessible::get_parentNode(ISimpleDOMNode __RPC_FAR *__RPC_FAR* aNode)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aNode)
return E_INVALIDARG;
*aNode = nullptr;
@@ -336,15 +306,11 @@ sdnAccessible::get_parentNode(ISimpleDOMNode __RPC_FAR *__RPC_FAR* aNode)
}
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
sdnAccessible::get_firstChild(ISimpleDOMNode __RPC_FAR *__RPC_FAR* aNode)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aNode)
return E_INVALIDARG;
*aNode = nullptr;
@@ -359,15 +325,11 @@ sdnAccessible::get_firstChild(ISimpleDOMNode __RPC_FAR *__RPC_FAR* aNode)
}
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
sdnAccessible::get_lastChild(ISimpleDOMNode __RPC_FAR *__RPC_FAR* aNode)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aNode)
return E_INVALIDARG;
*aNode = nullptr;
@@ -382,15 +344,11 @@ sdnAccessible::get_lastChild(ISimpleDOMNode __RPC_FAR *__RPC_FAR* aNode)
}
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
sdnAccessible::get_previousSibling(ISimpleDOMNode __RPC_FAR *__RPC_FAR* aNode)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aNode)
return E_INVALIDARG;
*aNode = nullptr;
@@ -405,15 +363,11 @@ sdnAccessible::get_previousSibling(ISimpleDOMNode __RPC_FAR *__RPC_FAR* aNode)
}
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
sdnAccessible::get_nextSibling(ISimpleDOMNode __RPC_FAR *__RPC_FAR* aNode)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aNode)
return E_INVALIDARG;
*aNode = nullptr;
@@ -428,16 +382,12 @@ sdnAccessible::get_nextSibling(ISimpleDOMNode __RPC_FAR *__RPC_FAR* aNode)
}
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
sdnAccessible::get_childAt(unsigned aChildIndex,
ISimpleDOMNode __RPC_FAR *__RPC_FAR* aNode)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aNode)
return E_INVALIDARG;
*aNode = nullptr;
@@ -453,15 +403,11 @@ sdnAccessible::get_childAt(unsigned aChildIndex,
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
sdnAccessible::get_innerHTML(BSTR __RPC_FAR* aInnerHTML)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aInnerHTML)
return E_INVALIDARG;
*aInnerHTML = nullptr;
@@ -482,15 +428,11 @@ sdnAccessible::get_innerHTML(BSTR __RPC_FAR* aInnerHTML)
return E_OUTOFMEMORY;
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
sdnAccessible::get_localInterface(void __RPC_FAR *__RPC_FAR* aLocalInterface)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aLocalInterface)
return E_INVALIDARG;
*aLocalInterface = nullptr;
@@ -502,15 +444,11 @@ sdnAccessible::get_localInterface(void __RPC_FAR *__RPC_FAR* aLocalInterface)
AddRef();
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
sdnAccessible::get_language(BSTR __RPC_FAR* aLanguage)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aLanguage)
return E_INVALIDARG;
*aLanguage = nullptr;
@@ -534,6 +472,4 @@ sdnAccessible::get_language(BSTR __RPC_FAR* aLanguage)
return E_OUTOFMEMORY;
return S_OK;
-
- A11Y_TRYBLOCK_END
}
diff --git a/accessible/windows/sdn/sdnDocAccessible.cpp b/accessible/windows/sdn/sdnDocAccessible.cpp
index 07b39e66f..a1c5be872 100644
--- a/accessible/windows/sdn/sdnDocAccessible.cpp
+++ b/accessible/windows/sdn/sdnDocAccessible.cpp
@@ -24,8 +24,6 @@ IMPL_IUNKNOWN_QUERY_TAIL_AGGREGATED(mAccessible)
STDMETHODIMP
sdnDocAccessible::get_URL(BSTR __RPC_FAR* aURL)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aURL)
return E_INVALIDARG;
*aURL = nullptr;
@@ -40,15 +38,11 @@ sdnDocAccessible::get_URL(BSTR __RPC_FAR* aURL)
*aURL = ::SysAllocStringLen(URL.get(), URL.Length());
return *aURL ? S_OK : E_OUTOFMEMORY;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
sdnDocAccessible::get_title(BSTR __RPC_FAR* aTitle)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aTitle)
return E_INVALIDARG;
*aTitle = nullptr;
@@ -60,15 +54,11 @@ sdnDocAccessible::get_title(BSTR __RPC_FAR* aTitle)
mAccessible->Title(title);
*aTitle = ::SysAllocStringLen(title.get(), title.Length());
return *aTitle ? S_OK : E_OUTOFMEMORY;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
sdnDocAccessible::get_mimeType(BSTR __RPC_FAR* aMimeType)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aMimeType)
return E_INVALIDARG;
*aMimeType = nullptr;
@@ -83,15 +73,11 @@ sdnDocAccessible::get_mimeType(BSTR __RPC_FAR* aMimeType)
*aMimeType = ::SysAllocStringLen(mimeType.get(), mimeType.Length());
return *aMimeType ? S_OK : E_OUTOFMEMORY;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
sdnDocAccessible::get_docType(BSTR __RPC_FAR* aDocType)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aDocType)
return E_INVALIDARG;
*aDocType = nullptr;
@@ -106,16 +92,12 @@ sdnDocAccessible::get_docType(BSTR __RPC_FAR* aDocType)
*aDocType = ::SysAllocStringLen(docType.get(), docType.Length());
return *aDocType ? S_OK : E_OUTOFMEMORY;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
sdnDocAccessible::get_nameSpaceURIForID(short aNameSpaceID,
BSTR __RPC_FAR* aNameSpaceURI)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aNameSpaceURI)
return E_INVALIDARG;
*aNameSpaceURI = nullptr;
@@ -138,20 +120,14 @@ sdnDocAccessible::get_nameSpaceURIForID(short aNameSpaceID,
nameSpaceURI.Length());
return *aNameSpaceURI ? S_OK : E_OUTOFMEMORY;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
sdnDocAccessible::put_alternateViewMediaTypes(BSTR __RPC_FAR* aCommaSeparatedMediaTypes)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aCommaSeparatedMediaTypes)
return E_INVALIDARG;
*aCommaSeparatedMediaTypes = nullptr;
return mAccessible->IsDefunct() ? CO_E_OBJNOTCONNECTED : E_NOTIMPL;
-
- A11Y_TRYBLOCK_END
}
diff --git a/accessible/windows/sdn/sdnTextAccessible.cpp b/accessible/windows/sdn/sdnTextAccessible.cpp
index b51caf44e..b6f580ba3 100644
--- a/accessible/windows/sdn/sdnTextAccessible.cpp
+++ b/accessible/windows/sdn/sdnTextAccessible.cpp
@@ -33,8 +33,6 @@ IMPL_IUNKNOWN_QUERY_TAIL_AGGREGATED(mAccessible)
STDMETHODIMP
sdnTextAccessible::get_domText(BSTR __RPC_FAR* aText)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aText)
return E_INVALIDARG;
*aText = nullptr;
@@ -51,8 +49,6 @@ sdnTextAccessible::get_domText(BSTR __RPC_FAR* aText)
*aText = ::SysAllocStringLen(nodeValue.get(), nodeValue.Length());
return *aText ? S_OK : E_OUTOFMEMORY;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
@@ -63,8 +59,6 @@ sdnTextAccessible::get_clippedSubstringBounds(unsigned int aStartIndex,
int __RPC_FAR* aWidth,
int __RPC_FAR* aHeight)
{
- A11Y_TRYBLOCK_BEGIN
-
nscoord x = 0, y = 0, width = 0, height = 0;
HRESULT rv = get_unclippedSubstringBounds(aStartIndex, aEndIndex,
&x, &y, &width, &height);
@@ -86,8 +80,6 @@ sdnTextAccessible::get_clippedSubstringBounds(unsigned int aStartIndex,
*aWidth = clippedRect.width;
*aHeight = clippedRect.height;
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
@@ -98,8 +90,6 @@ sdnTextAccessible::get_unclippedSubstringBounds(unsigned int aStartIndex,
int __RPC_FAR* aWidth,
int __RPC_FAR* aHeight)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aX || !aY || !aWidth || !aHeight)
return E_INVALIDARG;
*aX = *aY = *aWidth = *aHeight = 0;
@@ -135,16 +125,12 @@ sdnTextAccessible::get_unclippedSubstringBounds(unsigned int aStartIndex,
*aHeight = presContext->AppUnitsToDevPixels(sum.height);
return S_OK;
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
sdnTextAccessible::scrollToSubstring(unsigned int aStartIndex,
unsigned int aEndIndex)
{
- A11Y_TRYBLOCK_BEGIN
-
if (mAccessible->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@@ -159,15 +145,11 @@ sdnTextAccessible::scrollToSubstring(unsigned int aStartIndex,
nsCoreUtils::ScrollSubstringTo(mAccessible->GetFrame(), range,
nsIAccessibleScrollType::SCROLL_TYPE_ANYWHERE);
return GetHRESULT(rv);
-
- A11Y_TRYBLOCK_END
}
STDMETHODIMP
sdnTextAccessible::get_fontFamily(BSTR __RPC_FAR* aFontFamily)
{
- A11Y_TRYBLOCK_BEGIN
-
if (!aFontFamily)
return E_INVALIDARG;
*aFontFamily = nullptr;
@@ -189,8 +171,6 @@ sdnTextAccessible::get_fontFamily(BSTR __RPC_FAR* aFontFamily)
*aFontFamily = ::SysAllocStringLen(name.get(), name.Length());
return *aFontFamily ? S_OK : E_OUTOFMEMORY;
-
- A11Y_TRYBLOCK_END
}
nsIFrame*