From dddd41fe11616025a8d9d7ba5dde0c4050a1256c Mon Sep 17 00:00:00 2001 From: "Olli.Pettay%helsinki.fi" Date: Wed, 1 Nov 2006 08:30:01 +0000 Subject: [PATCH] Bug 358720, Crash [@ nsAccessibilityService::GetAccessible], r=aaronl, sr=neil --- accessible/src/base/nsAccessibilityService.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/accessible/src/base/nsAccessibilityService.cpp b/accessible/src/base/nsAccessibilityService.cpp index b451ec828e7..c6cd29d1b6e 100644 --- a/accessible/src/base/nsAccessibilityService.cpp +++ b/accessible/src/base/nsAccessibilityService.cpp @@ -1067,7 +1067,10 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode, PRBool *aIsHidden, nsIAccessible **aAccessible) { + NS_ENSURE_ARG_POINTER(aAccessible); + NS_ENSURE_ARG_POINTER(aFrameHint); *aAccessible = nsnull; + *aFrameHint = nsnull; if (!aPresShell || !aWeakShell) { return NS_ERROR_FAILURE; } @@ -1135,9 +1138,11 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode, } else { CreateRootAccessible(aPresShell, nodeIsDoc, getter_AddRefs(newAcc)); // Does Init() for us - NS_ASSERTION(newAcc, "No root/doc accessible created"); + NS_WARN_IF_FALSE(newAcc, "No root/doc accessible created"); } + NS_ENSURE_STATE(newAcc); + *aFrameHint = aPresShell->GetRootFrame(); NS_ADDREF(*aAccessible = newAcc ); return NS_OK;