From f2a90fffff1f667c838807f9696b5c050196a646 Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Mon, 26 Aug 2013 22:31:02 -0700 Subject: [PATCH] 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp index 41346fd9e31..f96e0e2befe 100644 --- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -70,6 +70,7 @@ #include "nsFocusManager.h" #include "nsGenericHTMLElement.h" #include "nsGkAtoms.h" +#include "nsHostObjectProtocolHandler.h" #include "nsHtml5Module.h" #include "nsHtml5StringParser.h" #include "nsIAsyncVerifyRedirectCallback.h" @@ -2715,10 +2716,12 @@ nsContentUtils::LoadImage(nsIURI* aURI, nsIDocument* aLoadingDocument, } nsCOMPtr 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 channelPolicy;