nsCOMPtr<nsIURI> baseURL; nsresult rv = NS_OK;
ImageURIChanged(aSrc);
nsHTMLImageElement::SetSrc(const nsAString& aSrc){  /*   * If caller is not chrome and dom.disable_image_src_set is true,   * prevent setting image.src by exiting early   */  nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));  if (prefBranch) {    PRBool disableImageSrcSet = PR_FALSE;    prefBranch->GetBoolPref("dom.disable_image_src_set", &disableImageSrcSet);    if (disableImageSrcSet && !nsContentUtils::IsCallerChrome()) {      return NS_OK;    }  }  nsCOMPtr<nsIURI> baseURL;  nsresult rv = NS_OK;  nsCOMPtr<nsIDOMDocument> domDoc;  nsContentUtils::GetDocumentFromCaller(getter_AddRefs(domDoc));  nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));  if (doc) {    // XXX GetBaseURL should do the GetDocumentURL for us    rv = doc->GetBaseURL(*getter_AddRefs(baseURL));    if (!baseURL) {      rv = doc->GetDocumentURL(getter_AddRefs(baseURL));    }  }  if (!baseURL) {    mNodeInfo->GetDocument(*getter_AddRefs(doc));    if (doc) {      rv = doc->GetBaseURL(*getter_AddRefs(baseURL));    }  }  if (NS_SUCCEEDED(rv)) {    rv = SetSrcInner(baseURL, aSrc);  }  return rv;}