From fdab0ffc9ee120dfcbb7521ce4e2826a453f6482 Mon Sep 17 00:00:00 2001 From: Neil Rashbrook Date: Sun, 1 Apr 2012 15:49:37 -0400 Subject: [PATCH] bug 736252 - remove uses of do_QueryInterface in CAccessibleAction r=surkov --- accessible/src/msaa/CAccessibleAction.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/accessible/src/msaa/CAccessibleAction.cpp b/accessible/src/msaa/CAccessibleAction.cpp index 9f81a76238a1..fa467c8632d2 100644 --- a/accessible/src/msaa/CAccessibleAction.cpp +++ b/accessible/src/msaa/CAccessibleAction.cpp @@ -42,7 +42,7 @@ #include "AccessibleAction_i.c" -#include "nsAccessible.h" +#include "nsAccessibleWrap.h" // IUnknown @@ -71,8 +71,8 @@ __try { *aActionCount = 0; - nsRefPtr acc(do_QueryObject(this)); - if (!acc || acc->IsDefunct()) + nsAccessibleWrap* acc = static_cast(this); + if (acc->IsDefunct()) return E_FAIL; *aActionCount = acc->ActionCount(); @@ -86,8 +86,8 @@ STDMETHODIMP CAccessibleAction::doAction(long aActionIndex) { __try { - nsCOMPtr acc(do_QueryObject(this)); - if (!acc) + nsAccessibleWrap* acc = static_cast(this); + if (acc->IsDefunct()) return E_FAIL; PRUint8 index = static_cast(aActionIndex); @@ -104,8 +104,8 @@ CAccessibleAction::get_description(long aActionIndex, BSTR *aDescription) __try { *aDescription = NULL; - nsCOMPtr acc(do_QueryObject(this)); - if (!acc) + nsAccessibleWrap* acc = static_cast(this); + if (acc->IsDefunct()) return E_FAIL; nsAutoString description; @@ -142,8 +142,8 @@ __try { if (aActionIndex != 0 || aNumMaxBinding < 1) return E_INVALIDARG; - nsRefPtr acc(do_QueryObject(this)); - if (!acc || acc->IsDefunct()) + nsAccessibleWrap* acc = static_cast(this); + if (acc->IsDefunct()) return E_FAIL; // Expose keyboard shortcut if it's not exposed via MSAA keyboard shortcut. @@ -181,8 +181,8 @@ CAccessibleAction::get_name(long aActionIndex, BSTR *aName) __try { *aName = NULL; - nsCOMPtr acc(do_QueryObject(this)); - if (!acc) + nsAccessibleWrap* acc = static_cast(this); + if (acc->IsDefunct()) return E_FAIL; nsAutoString name;