From 7ed70c4747bc88ff6b36add3eccf2452299dd994 Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Fri, 22 Jan 2016 06:22:57 -0500 Subject: [PATCH] bug 1243077 - make xpcAccessible::GetChildAt() work with proxied accessibles r=davidb --- accessible/xpcom/xpcAccessible.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/accessible/xpcom/xpcAccessible.cpp b/accessible/xpcom/xpcAccessible.cpp index 78f4d442fa7..8a6b56d7ac5 100644 --- a/accessible/xpcom/xpcAccessible.cpp +++ b/accessible/xpcom/xpcAccessible.cpp @@ -103,16 +103,16 @@ xpcAccessible::GetChildAt(int32_t aChildIndex, nsIAccessible** aChild) NS_ENSURE_ARG_POINTER(aChild); *aChild = nullptr; - if (!Intl()) + if (IntlGeneric().IsNull()) return NS_ERROR_FAILURE; // If child index is negative, then return last child. // XXX: do we really need this? if (aChildIndex < 0) - aChildIndex = Intl()->ChildCount() - 1; + aChildIndex = IntlGeneric().ChildCount() - 1; - Accessible* child = Intl()->GetChildAt(aChildIndex); - if (!child) + AccessibleOrProxy child = IntlGeneric().ChildAt(aChildIndex); + if (child.IsNull()) return NS_ERROR_INVALID_ARG; NS_ADDREF(*aChild = ToXPC(child));