summaryrefslogtreecommitdiffstats
path: root/dom/serviceworkers/ServiceWorkerPrivate.cpp
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 /dom/serviceworkers/ServiceWorkerPrivate.cpp
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 'dom/serviceworkers/ServiceWorkerPrivate.cpp')
-rw-r--r--dom/serviceworkers/ServiceWorkerPrivate.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/dom/serviceworkers/ServiceWorkerPrivate.cpp b/dom/serviceworkers/ServiceWorkerPrivate.cpp
index 864a598006..664874d991 100644
--- a/dom/serviceworkers/ServiceWorkerPrivate.cpp
+++ b/dom/serviceworkers/ServiceWorkerPrivate.cpp
@@ -324,7 +324,7 @@ Result<IPCInternalRequest, nsresult> GetIPCInternalRequest(
RequestCredentials requestCredentials =
InternalRequest::MapChannelToRequestCredentials(underlyingChannel);
- nsAutoString referrer;
+ nsAutoCString referrer;
ReferrerPolicy referrerPolicy = ReferrerPolicy::_empty;
ReferrerPolicy environmentReferrerPolicy = ReferrerPolicy::_empty;
@@ -544,10 +544,11 @@ nsresult ServiceWorkerPrivate::Initialize() {
nsAutoString scheme;
nsAutoString pkBaseDomain;
int32_t unused;
+ bool unused2;
if (OriginAttributes::ParsePartitionKey(
principal->OriginAttributesRef().mPartitionKey, scheme,
- pkBaseDomain, unused)) {
+ pkBaseDomain, unused, unused2)) {
nsCOMPtr<nsIURI> firstPartyURI;
rv = NS_NewURI(getter_AddRefs(firstPartyURI),
scheme + u"://"_ns + pkBaseDomain);
@@ -592,7 +593,8 @@ nsresult ServiceWorkerPrivate::Initialize() {
}
}
} else {
- net::CookieJarSettings::Cast(cookieJarSettings)->SetPartitionKey(uri);
+ net::CookieJarSettings::Cast(cookieJarSettings)
+ ->SetPartitionKey(uri, false);
// The service worker is for a first-party context, we can use the uri of
// the service worker as the first-party domain to get the fingerprinting