if (mDocument && !baseURL) { result = mDocument->GetBaseURL(*getter_AddRefs(baseURL));
nsCOMPtr<nsIDocument> doc; mNodeInfo->GetDocument(*getter_AddRefs(doc));  if (doc && !baseURL) { rv = doc->GetBaseURL(*getter_AddRefs(baseURL));
nsHTMLImageElement::SetSrc(const nsAReadableString& aSrc){  nsCOMPtr<nsIURI> baseURL;  nsresult result = NS_OK;  (void) GetCallerSourceURL(getter_AddRefs(baseURL));  if (mDocument && !baseURL) {    result = mDocument->GetBaseURL(*getter_AddRefs(baseURL));  }  if (mOwnerDocument && !baseURL) {    result = mOwnerDocument->GetBaseURL(*getter_AddRefs(baseURL));  }  if (NS_SUCCEEDED(result)) {    result = SetSrcInner(baseURL, aSrc);  }  return result;}