nsIDocument* doc = nsnull; if (NS_SUCCEEDED(mContent->GetDocument(doc))) {
nsCOMPtr<nsIDocument> doc; mContent->GetDocument(*getter_AddRefs(doc)); if (doc)
nsObjectFrame::GetBaseURL(nsIURI* &aURL){  nsIHTMLContent* htmlContent;  if (NS_SUCCEEDED(mContent->QueryInterface(kIHTMLContentIID, (void**)&htmlContent)))   {    htmlContent->GetBaseURL(aURL);    NS_RELEASE(htmlContent);  }  else   {    nsIDocument* doc = nsnull;    if (NS_SUCCEEDED(mContent->GetDocument(doc))) 	{      doc->GetBaseURL(aURL);      NS_RELEASE(doc);	}	else	  return NS_ERROR_FAILURE;  }  return NS_OK;}