Bug 611241: Allow SVG filters from external documents to be used in about: pages. r=bzbarsky a=blocking-betaN+
authorDaniel Holbert <dholbert@cs.stanford.edu>
Tue, 21 Dec 2010 15:02:46 -0800
changeset 59575 95bbe1076dcb873cfed98fc30356bcc87a797b71
parent 59574 a2a3a6e8b0e0e1351ed92658583aa3c7ed1e441f
child 59576 6b98f6cf45899ad77115976ea1dd160eeff93ba8
push id17673
push userdholbert@mozilla.com
push dateTue, 21 Dec 2010 23:04:38 +0000
treeherdermozilla-central@52b229f6a051 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky, blocking-betaN
bugs611241
milestone2.0b9pre
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 611241: Allow SVG filters from external documents to be used in about: pages. r=bzbarsky a=blocking-betaN+
content/base/src/nsReferencedElement.cpp
--- a/content/base/src/nsReferencedElement.cpp
+++ b/content/base/src/nsReferencedElement.cpp
@@ -135,20 +135,20 @@ nsReferencedElement::Reset(nsIContent* a
 
         // We don't have watching working yet for XBL, so bail out here.
         return;
       }
     }
   }
 
   nsCOMPtr<nsIURL> documentURL = do_QueryInterface(doc->GetDocumentURI());
-  if (!documentURL)
-    return;
-
-  if (!EqualExceptRef(url, documentURL)) {
+  // We've already checked that |url| is an nsIURL.  So if the document URI is
+  // not an nsIURL then |url| is certainly not going to be pointing to the same
+  // document as the document URI.
+  if (!documentURL || !EqualExceptRef(url, documentURL)) {
     nsRefPtr<nsIDocument::ExternalResourceLoad> load;
     doc = doc->RequestExternalResource(url, aFromContent, getter_AddRefs(load));
     if (!doc) {
       if (!load || !aWatch) {
         // Nothing will ever happen here
         return;
       }