summaryrefslogtreecommitdiffstats
path: root/image/imgRequest.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
commitdef92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch)
tree2ef34b9ad8bb9a9220e05d60352558b15f513894 /image/imgRequest.cpp
parentAdding debian version 125.0.3-1. (diff)
downloadfirefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz
firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.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