diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /dom/fetch/InternalRequest.h | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/fetch/InternalRequest.h')
-rw-r--r-- | dom/fetch/InternalRequest.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/dom/fetch/InternalRequest.h b/dom/fetch/InternalRequest.h index d2b7721f5e..3a14a907ad 100644 --- a/dom/fetch/InternalRequest.h +++ b/dom/fetch/InternalRequest.h @@ -92,7 +92,7 @@ class InternalRequest final : public AtomicSafeRefCounted<InternalRequest> { RequestCache aCacheMode, RequestMode aMode, RequestRedirect aRequestRedirect, RequestCredentials aRequestCredentials, - const nsAString& aReferrer, ReferrerPolicy aReferrerPolicy, + const nsACString& aReferrer, ReferrerPolicy aReferrerPolicy, RequestPriority aPriority, nsContentPolicyType aContentPolicyType, const nsAString& aIntegrity); @@ -159,9 +159,9 @@ class InternalRequest final : public AtomicSafeRefCounted<InternalRequest> { void GetURLListWithoutFragment(nsTArray<nsCString>& aURLList) { aURLList.Assign(mURLList); } - void GetReferrer(nsAString& aReferrer) const { aReferrer.Assign(mReferrer); } + void GetReferrer(nsACString& aReferrer) const { aReferrer.Assign(mReferrer); } - void SetReferrer(const nsAString& aReferrer) { + void SetReferrer(const nsACString& aReferrer) { #ifdef DEBUG bool validReferrer = false; if (aReferrer.IsEmpty() || @@ -179,10 +179,9 @@ class InternalRequest final : public AtomicSafeRefCounted<InternalRequest> { uint32_t pathPos; int32_t pathLen; - NS_ConvertUTF16toUTF8 ref(aReferrer); - nsresult rv = - parser->ParseURL(ref.get(), ref.Length(), &schemePos, &schemeLen, - &authorityPos, &authorityLen, &pathPos, &pathLen); + nsresult rv = parser->ParseURL( + aReferrer.BeginReading(), aReferrer.Length(), &schemePos, + &schemeLen, &authorityPos, &authorityLen, &pathPos, &pathLen); if (NS_FAILED(rv)) { NS_WARNING("Invalid referrer URL!"); } else if (schemeLen < 0 || authorityLen < 0) { @@ -263,6 +262,10 @@ class InternalRequest final : public AtomicSafeRefCounted<InternalRequest> { mIntegrity.Assign(aIntegrity); } + bool GetKeepalive() const { return mKeepalive; } + + void SetKeepalive(const bool aKeepalive) { mKeepalive = aKeepalive; } + bool MozErrors() const { return mMozErrors; } void SetMozErrors() { mMozErrors = true; } @@ -440,7 +443,7 @@ class InternalRequest final : public AtomicSafeRefCounted<InternalRequest> { // Empty string: no-referrer // "about:client": client (default) // URL: an URL - nsString mReferrer; + nsCString mReferrer; ReferrerPolicy mReferrerPolicy; // This will be used for request created from Window or Worker contexts @@ -454,6 +457,7 @@ class InternalRequest final : public AtomicSafeRefCounted<InternalRequest> { RequestRedirect mRedirectMode; RequestPriority mPriorityMode = RequestPriority::Auto; nsString mIntegrity; + bool mKeepalive = false; bool mMozErrors = false; nsCString mFragment; bool mSkipServiceWorker = false; |