From a11a3ce2c849d19b6b345b3c5392ea2723e0b8c4 Mon Sep 17 00:00:00 2001 From: Alexander Surkov Date: Fri, 17 Oct 2008 18:09:22 +0800 Subject: [PATCH] Bug 460402 - remove extra noise when there is no document accessible, r=aaronlev --- accessible/src/base/nsAccessibilityService.cpp | 1 - accessible/src/base/nsRootAccessible.cpp | 7 +++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/accessible/src/base/nsAccessibilityService.cpp b/accessible/src/base/nsAccessibilityService.cpp index 91a964bba7d4..e0fc3f720065 100644 --- a/accessible/src/base/nsAccessibilityService.cpp +++ b/accessible/src/base/nsAccessibilityService.cpp @@ -1367,7 +1367,6 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode, } else { CreateRootAccessible(aPresShell, nodeIsDoc, getter_AddRefs(newAcc)); // Does Init() for us - NS_WARN_IF_FALSE(newAcc, "No root/doc accessible created"); } *aFrameHint = aPresShell->GetRootFrame(); diff --git a/accessible/src/base/nsRootAccessible.cpp b/accessible/src/base/nsRootAccessible.cpp index ac087795fe63..ba50568f96b8 100644 --- a/accessible/src/base/nsRootAccessible.cpp +++ b/accessible/src/base/nsRootAccessible.cpp @@ -1068,10 +1068,9 @@ NS_IMETHODIMP nsRootAccessible::GetAccessibleRelated(PRUint32 aRelationType, if (contentTreeItem) { nsCOMPtr accDoc = GetDocAccessibleFor(contentTreeItem, PR_TRUE); - NS_ASSERTION(accDoc, "No EMBEDS document"); - if (accDoc) { - accDoc->QueryInterface(NS_GET_IID(nsIAccessible), (void**)aRelated); - } + + if (accDoc) + CallQueryInterface(accDoc, aRelated); } return NS_OK; }