summaryrefslogtreecommitdiffstats
path: root/image/imgRequest.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /image/imgRequest.cpp
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'image/imgRequest.cpp')
-rw-r--r--image/imgRequest.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/image/imgRequest.cpp b/image/imgRequest.cpp
index 9713d2f33e..857d1b75eb 100644
--- a/image/imgRequest.cpp
+++ b/image/imgRequest.cpp
@@ -711,16 +711,17 @@ imgRequest::OnStartRequest(nsIRequest* aRequest) {
nsAutoCString mimeType;
nsresult rv = channel->GetContentType(mimeType);
if (NS_SUCCEEDED(rv) && !mimeType.EqualsLiteral(IMAGE_SVG_XML)) {
+ mOffMainThreadData = true;
// Retarget OnDataAvailable to the DecodePool's IO thread.
nsCOMPtr<nsISerialEventTarget> target =
DecodePool::Singleton()->GetIOEventTarget();
rv = retargetable->RetargetDeliveryTo(target);
+ MOZ_LOG(gImgLog, LogLevel::Warning,
+ ("[this=%p] imgRequest::OnStartRequest -- "
+ "RetargetDeliveryTo rv %" PRIu32 "=%s\n",
+ this, static_cast<uint32_t>(rv),
+ NS_SUCCEEDED(rv) ? "succeeded" : "failed"));
}
- MOZ_LOG(gImgLog, LogLevel::Warning,
- ("[this=%p] imgRequest::OnStartRequest -- "
- "RetargetDeliveryTo rv %" PRIu32 "=%s\n",
- this, static_cast<uint32_t>(rv),
- NS_SUCCEEDED(rv) ? "succeeded" : "failed"));
}
return NS_OK;
@@ -834,9 +835,7 @@ static nsresult sniff_mimetype_callback(nsIInputStream* in, void* closure,
/** nsThreadRetargetableStreamListener methods **/
NS_IMETHODIMP
imgRequest::CheckListenerChain() {
- // TODO Might need more checking here.
- NS_ASSERTION(NS_IsMainThread(), "Should be on the main thread!");
- return NS_OK;
+ return mOffMainThreadData ? NS_OK : NS_ERROR_NO_INTERFACE;
}
NS_IMETHODIMP