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(); } }