bug 878786 - relax assertion requiring a loadGroup when the loading document is an SVG-glyph document loaded from a font table. r=bz
authorJonathan Kew <jkew@mozilla.com>
Mon, 26 Aug 2013 22:31:02 -0700
changeset 144449 6ab17d2d97bf5a4ac624dfb3736ee5d687370abe
parent 144448 a32b2b75f33c46df6906c6a0b155d3bd8ab7ee30
child 144450 47068f470e9baf303cc64f2e4c25a9a0f4c1e3f8
push id25162
push useremorley@mozilla.com
push dateTue, 27 Aug 2013 14:16:53 +0000
treeherdermozilla-central@f57a6179a085 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs878786
milestone26.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 878786 - relax assertion requiring a loadGroup when the loading document is an SVG-glyph document loaded from a font table. r=bz
content/base/src/nsContentUtils.cpp
--- a/content/base/src/nsContentUtils.cpp
+++ b/content/base/src/nsContentUtils.cpp
@@ -65,16 +65,17 @@
 #include "nsDOMTouchEvent.h"
 #include "nsError.h"
 #include "nsEventDispatcher.h"
 #include "nsEventListenerManager.h"
 #include "nsEventStateManager.h"
 #include "nsFocusManager.h"
 #include "nsGenericHTMLElement.h"
 #include "nsGkAtoms.h"
+#include "nsHostObjectProtocolHandler.h"
 #include "nsHtml5Module.h"
 #include "nsHtml5StringParser.h"
 #include "nsIAsyncVerifyRedirectCallback.h"
 #include "nsICategoryManager.h"
 #include "nsIChannelEventSink.h"
 #include "nsIChannelPolicy.h"
 #include "nsICharsetConverterManager.h"
 #include "nsICharsetDetectionObserver.h"
@@ -2710,20 +2711,22 @@ nsContentUtils::LoadImage(nsIURI* aURI, 
 
   imgLoader* imgLoader = GetImgLoaderForDocument(aLoadingDocument);
   if (!imgLoader) {
     // nothing we can do here
     return NS_OK;
   }
 
   nsCOMPtr<nsILoadGroup> loadGroup = aLoadingDocument->GetDocumentLoadGroup();
-  NS_ASSERTION(loadGroup, "Could not get loadgroup; onload may fire too early");
 
   nsIURI *documentURI = aLoadingDocument->GetDocumentURI();
 
+  NS_ASSERTION(loadGroup || IsFontTableURI(documentURI),
+               "Could not get loadgroup; onload may fire too early");
+
   // check for a Content Security Policy to pass down to the channel that
   // will get created to load the image
   nsCOMPtr<nsIChannelPolicy> channelPolicy;
   nsCOMPtr<nsIContentSecurityPolicy> csp;
   if (aLoadingPrincipal) {
     nsresult rv = aLoadingPrincipal->GetCsp(getter_AddRefs(csp));
     NS_ENSURE_SUCCESS(rv, rv);
     if (csp) {