if (!domWin) return nsnull;
DocumentViewerImpl::GetDOMWinForWebShell(nsIWebShell* aWebShell){  NS_ASSERTION(aWebShell, "Pointer is null!");  nsCOMPtr<nsIDOMWindow> domWin = do_GetInterface(aWebShell);   if (!domWin) return nsnull;  nsCOMPtr<nsIDOMWindowInternal> domWinInt(do_QueryInterface(domWin));  if (!domWinInt) return nsnull;  nsIDOMWindowInternal * dw = NS_STATIC_CAST(nsIDOMWindowInternal *, domWinInt.get());  NS_ADDREF(dw);  return dw;}