From 1a6d7c503e7ad562ac846a23ef7ac2033b3fefdc 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 91a964bba7d..e0fc3f72006 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 ac087795fe6..ba50568f96b 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; }