Ticket #16497: nsContentUtils-patch.txt

File nsContentUtils-patch.txt, 1.1 KB (added by mcs, 4 years ago)

a possible fix

Line 
1diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp
2index 0ce2095..6b7461a 100644
3--- a/dom/base/nsContentUtils.cpp
4+++ b/dom/base/nsContentUtils.cpp
5@@ -2992,17 +2992,16 @@ nsContentUtils::LoadImage(nsIURI* aURI, nsINode* aLoadingNode,
6                           nsIPrincipal* aLoadingPrincipal, nsIURI* aReferrer,
7                           net::ReferrerPolicy aReferrerPolicy,
8                           imgINotificationObserver* aObserver, int32_t aLoadFlags,
9                           const nsAString& initiatorType,
10                           imgRequestProxy** aRequest,
11                           uint32_t aContentPolicyType)
12 {
13   NS_PRECONDITION(aURI, "Must have a URI");
14-  NS_PRECONDITION(aLoadingDocument, "Must have a document");
15   NS_PRECONDITION(aLoadingPrincipal, "Must have a principal");
16   NS_PRECONDITION(aRequest, "Null out param");
17 
18   nsCOMPtr<nsIDocument> aLoadingDocument(aLoadingNode ? aLoadingNode->GetCurrentDoc() : nullptr);
19 
20   imgLoader* imgLoader = GetImgLoaderForDocument(aLoadingDocument);
21   if (!imgLoader) {
22     // nothing we can do here