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;