Bug 820971: Ignore the ref when checking to see if the image URI is the document URI. r=bz
authorKyle Huey <khuey@kylehuey.com>
Fri, 14 Dec 2012 08:15:26 -0800
changeset 125172 08f9c8a1c7e765e8ae50c32487859674754f9dc1
parent 125171 67d84be0cc83fd23075465eca4d131436e10a132
child 125173 71759cb2a7d932a1faf2e61f04f879b970449f5b
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs820971
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 820971: Ignore the ref when checking to see if the image URI is the document URI. r=bz
content/base/src/nsImageLoadingContent.cpp
--- a/content/base/src/nsImageLoadingContent.cpp
+++ b/content/base/src/nsImageLoadingContent.cpp
@@ -553,17 +553,17 @@ nsImageLoadingContent::LoadImage(const n
   nsresult rv = StringToURI(aNewURI, doc, getter_AddRefs(imageURI));
   NS_ENSURE_SUCCESS(rv, rv);
   // XXXbiesi fire onerror if that failed?
 
   bool equal;
 
   if (aNewURI.IsEmpty() &&
       doc->GetDocumentURI() &&
-      NS_SUCCEEDED(doc->GetDocumentURI()->Equals(imageURI, &equal)) && 
+      NS_SUCCEEDED(doc->GetDocumentURI()->EqualsExceptRef(imageURI, &equal)) &&
       equal)  {
 
     // Loading an embedded img from the same URI as the document URI will not work
     // as a resource cannot recursively embed itself. Attempting to do so generally
     // results in having to pre-emptively close down an in-flight HTTP transaction 
     // and then incurring the significant cost of establishing a new TCP channel.
     // This is generally triggered from <img src=""> 
     // In light of that, just skip loading it..