summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol/res
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:42 +0000
commitda4c7e7ed675c3bf405668739c3012d140856109 (patch)
treecdd868dba063fecba609a1d819de271f0d51b23e /netwerk/protocol/res
parentAdding upstream version 125.0.3. (diff)
downloadfirefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz
firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'netwerk/protocol/res')
-rw-r--r--netwerk/protocol/res/PageThumbProtocolHandler.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/netwerk/protocol/res/PageThumbProtocolHandler.cpp b/netwerk/protocol/res/PageThumbProtocolHandler.cpp
index 2d9777da7b..ece55aa54c 100644
--- a/netwerk/protocol/res/PageThumbProtocolHandler.cpp
+++ b/netwerk/protocol/res/PageThumbProtocolHandler.cpp
@@ -304,9 +304,9 @@ nsresult PageThumbProtocolHandler::GetThumbnailPath(const nsACString& aPath,
}
// Extract URL from query string.
- nsAutoString url;
+ nsAutoCString url;
bool found =
- URLParams::Extract(Substring(aPath, queryIndex + 1), u"url"_ns, url);
+ URLParams::Extract(Substring(aPath, queryIndex + 1), "url"_ns, url);
if (!found || url.IsVoid()) {
return NS_ERROR_NOT_AVAILABLE;
}
@@ -320,7 +320,8 @@ nsresult PageThumbProtocolHandler::GetThumbnailPath(const nsACString& aPath,
}
// Use PageThumbsStorageService to get the local file path of the screenshot
// for the given URL.
- rv = pageThumbsStorage->GetFilePathForURL(url, aThumbnailPath);
+ rv = pageThumbsStorage->GetFilePathForURL(NS_ConvertUTF8toUTF16(url),
+ aThumbnailPath);
#ifdef MOZ_PLACES
} else if (aHost.EqualsLiteral(PLACES_PREVIEWS_HOST)) {
nsCOMPtr<nsIPlacesPreviewsHelperService> helper =
@@ -328,7 +329,7 @@ nsresult PageThumbProtocolHandler::GetThumbnailPath(const nsACString& aPath,
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
- rv = helper->GetFilePathForURL(url, aThumbnailPath);
+ rv = helper->GetFilePathForURL(NS_ConvertUTF8toUTF16(url), aThumbnailPath);
#endif
} else {
MOZ_ASSERT_UNREACHABLE("Unknown thumbnail host");