commit ce12fe1250a15a290f59b643c52e99878645abb2
parent c4ed3e87f339b4caddceca5a1afa4a0453c4b485
Author: Valentin Gosu <valentin.gosu@gmail.com>
Date: Thu, 16 Oct 2025 11:05:03 +0000
Bug 1433890 - Do not use the webext channel's real URL in nsIndexedToHTML r=robwu,necko-reviewers,sunil
Differential Revision: https://phabricator.services.mozilla.com/D268356
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/netwerk/streamconv/converters/nsIndexedToHTML.cpp b/netwerk/streamconv/converters/nsIndexedToHTML.cpp
@@ -135,8 +135,9 @@ nsresult nsIndexedToHTML::DoOnStartRequest(nsIRequest* request,
if (NS_FAILED(rv)) return rv;
// We use the original URI for the title and parent link when it's a
- // resource:// url, instead of the jar:file:// url it resolves to.
- if (!uri->SchemeIs("resource")) {
+ // resource:// or moz-extension:// url, instead of the jar:file://
+ // url it resolves to.
+ if (!uri->SchemeIs("resource") && !uri->SchemeIs("moz-extension")) {
rv = channel->GetURI(getter_AddRefs(uri));
if (NS_FAILED(rv)) return rv;
}