return CallQueryInterface(subShell, aResult);
nsCOMPtr<nsISupports> container; sub_doc->GetContainer(getter_AddRefs(container));  if (!container) { return NS_OK; }  return CallQueryInterface(container, aResult);
NS_IMETHODIMP nsEditorBoxObject::GetDocShell(nsIDocShell** aResult){  *aResult = nsnull;  if (!mPresShell)    return NS_OK;  nsCOMPtr<nsISupports> subShell;  mPresShell->GetSubShellFor(mContent, getter_AddRefs(subShell));  if(!subShell)    return NS_OK;  return CallQueryInterface(subShell, aResult); //Addref happens here.}