summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-10-22 20:43:08 +0000
committerMoonchild <moonchild@palemoon.org>2020-10-24 10:38:35 +0000
commitd7a05ea9e50f7484d09caf93c554b4be0c9e887d (patch)
tree4daed2639a81534338b204f809d7d5af8cfe9f91 /dom
parent10bf4a6d5b651141171e648fde1b0ba25a87d37d (diff)
downloadUXP-d7a05ea9e50f7484d09caf93c554b4be0c9e887d.tar
UXP-d7a05ea9e50f7484d09caf93c554b4be0c9e887d.tar.gz
UXP-d7a05ea9e50f7484d09caf93c554b4be0c9e887d.tar.lz
UXP-d7a05ea9e50f7484d09caf93c554b4be0c9e887d.tar.xz
UXP-d7a05ea9e50f7484d09caf93c554b4be0c9e887d.zip
[DOM] When failing to create a channel and an image request, make sure to set
the image blocking status appropriately. This is the same status as we do for known no-data protocols and ensures we treat these two cases the same.
Diffstat (limited to 'dom')
-rw-r--r--dom/base/nsImageLoadingContent.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/dom/base/nsImageLoadingContent.cpp b/dom/base/nsImageLoadingContent.cpp
index 4aad55941..07bdb6967 100644
--- a/dom/base/nsImageLoadingContent.cpp
+++ b/dom/base/nsImageLoadingContent.cpp
@@ -933,8 +933,12 @@ nsImageLoadingContent::LoadImage(nsIURI* aNewURI,
MOZ_ASSERT(!req, "Shouldn't have non-null request here");
// If we don't have a current URI, we might as well store this URI so people
// know what we tried (and failed) to load.
- if (!mCurrentRequest)
+ if (!mCurrentRequest) {
mCurrentURI = aNewURI;
+ if (mImageBlockingStatus == nsIContentPolicy::ACCEPT) {
+ mImageBlockingStatus = nsIContentPolicy::REJECT_REQUEST;
+ }
+ }
FireEvent(NS_LITERAL_STRING("error"));
FireEvent(NS_LITERAL_STRING("loadend"));