Bug 378776. Follow-up to original checkin -- remove 2 more cases of GetNumberOfShells(). r=smaug

This commit is contained in:
aaronleventhal@moonset.net 2007-05-23 18:33:15 -07:00
parent f785abd6a0
commit da87a6ca1f
2 changed files with 2 additions and 5 deletions

View File

@ -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<nsIWeakReference> weakShell =

View File

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