if (mCurrentRequest && !mPendingRequest && oldCurrentRequest != mCurrentRequest) {    nsCOMPtr<imgIContainer> container; mCurrentRequest->GetImage(getter_AddRefs(container)); if (container) { container->ResetAnimation(); } }
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;    }  }  // Call ImageURIChanged first so that our image load will kick off  // before the SetAttr triggers a reflow  ImageURIChanged(aSrc);  return nsGenericHTMLLeafElement::SetAttr(kNameSpaceID_None,                                           nsHTMLAtoms::src, aSrc, PR_TRUE);}