From e6a7e4ff6a873840f2039c1b3b0bd22b4150732a Mon Sep 17 00:00:00 2001 From: "aaronleventhal@moonset.net" Date: Wed, 23 May 2007 18:33:15 -0700 Subject: [PATCH] Bug 378776. Follow-up to original checkin -- remove 2 more cases of GetNumberOfShells(). r=smaug --- accessible/src/base/nsAccessibilityService.cpp | 5 +---- extensions/access-builtin/accessproxy/nsAccessProxy.cpp | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/accessible/src/base/nsAccessibilityService.cpp b/accessible/src/base/nsAccessibilityService.cpp index 2a14a46d00a..7906521ccdd 100644 --- a/accessible/src/base/nsAccessibilityService.cpp +++ b/accessible/src/base/nsAccessibilityService.cpp @@ -289,10 +289,7 @@ nsAccessibilityService::GetInfo(nsISupports* aFrame, nsIFrame** aRealFrame, nsIW if (!document) return NS_ERROR_FAILURE; -#ifdef DEBUG_A11Y - PRInt32 shells = document->GetNumberOfShells(); - NS_ASSERTION(shells > 0,"Error no shells!"); -#endif + NS_ASSERTION(document->GetPrimaryShell(),"Error no shells!"); // do_GetWR only works into a |nsCOMPtr| :-( nsCOMPtr weakShell = diff --git a/extensions/access-builtin/accessproxy/nsAccessProxy.cpp b/extensions/access-builtin/accessproxy/nsAccessProxy.cpp index 714f051fa7f..f11718c34a8 100644 --- a/extensions/access-builtin/accessproxy/nsAccessProxy.cpp +++ b/extensions/access-builtin/accessproxy/nsAccessProxy.cpp @@ -140,7 +140,7 @@ NS_IMETHODIMP nsAccessProxy::HandleEvent(nsIDOMEvent* aEvent) domNode->GetOwnerDocument(getter_AddRefs(domDoc)); if (domDoc) { doc = do_QueryInterface(domDoc); - if (doc && doc->GetNumberOfShells()>0) { + if (doc) { presShell = doc->GetPrimaryShell(); } }