From 6db1192c25156aaa5c51da6a71e2fa0b81414fac Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Tue, 19 Jan 2016 07:40:42 -0500 Subject: [PATCH] bug 1241453 - clean up GetAccessibleWrap() r=davidb We can simplify it some to make better use of AccessibleOrProxy. --- accessible/atk/AccessibleWrap.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/accessible/atk/AccessibleWrap.cpp b/accessible/atk/AccessibleWrap.cpp index cf12459fc20..8c2a85d5cc0 100644 --- a/accessible/atk/AccessibleWrap.cpp +++ b/accessible/atk/AccessibleWrap.cpp @@ -1064,13 +1064,13 @@ GetAccessibleWrap(AtkObject* aAtkObj) NS_ENSURE_TRUE(isMAIObject || MAI_IS_ATK_SOCKET(aAtkObj), nullptr); - uintptr_t accWrapPtr = isMAIObject ? - MAI_ATK_OBJECT(aAtkObj)->accWrap.Bits() : - reinterpret_cast(MAI_ATK_SOCKET(aAtkObj)->accWrap); - if (accWrapPtr & IS_PROXY) - return nullptr; - - AccessibleWrap* accWrap = reinterpret_cast(accWrapPtr); + AccessibleWrap* accWrap = nullptr; + if (isMAIObject) { + Accessible* acc = MAI_ATK_OBJECT(aAtkObj)->accWrap.AsAccessible(); + accWrap = static_cast(acc); + } else { + accWrap = MAI_ATK_SOCKET(aAtkObj)->accWrap; + } // Check if the accessible was deconstructed. if (!accWrap)