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/quota/StorageOriginAttributes.cpp | |
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/quota/StorageOriginAttributes.cpp')
-rw-r--r-- | dom/quota/StorageOriginAttributes.cpp | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/dom/quota/StorageOriginAttributes.cpp b/dom/quota/StorageOriginAttributes.cpp index bcdf47bce8..b5fd68407a 100644 --- a/dom/quota/StorageOriginAttributes.cpp +++ b/dom/quota/StorageOriginAttributes.cpp @@ -17,18 +17,17 @@ void StorageOriginAttributes::CreateSuffix(nsACString& aStr) const { nsCString str1; URLParams params; - nsAutoString value; + nsAutoCString value; if (mInIsolatedMozBrowser) { - params.Set(u"inBrowser"_ns, u"1"_ns); + params.Set("inBrowser"_ns, "1"_ns); } str1.Truncate(); - params.Serialize(value, true); if (!value.IsEmpty()) { str1.AppendLiteral("^"); - str1.Append(NS_ConvertUTF16toUTF8(value)); + str1.Append(value); } // Make sure that the string don't contain characters that would get replaced @@ -67,22 +66,22 @@ bool StorageOriginAttributes::PopulateFromSuffix(const nsACString& aStr) { return false; } - bool ok = - URLParams::Parse(Substring(aStr, 1, aStr.Length() - 1), true, - [this](const nsAString& aName, const nsAString& aValue) { - if (aName.EqualsLiteral("inBrowser")) { - if (!aValue.EqualsLiteral("1")) { - return false; - } - - mInIsolatedMozBrowser = true; - return true; - } - - // Let OriginAttributes::PopulateFromSuffix parse other - // origin attributes. - return true; - }); + bool ok = URLParams::Parse( + Substring(aStr, 1, aStr.Length() - 1), true, + [this](const nsACString& aName, const nsACString& aValue) { + if (aName.EqualsLiteral("inBrowser")) { + if (!aValue.EqualsLiteral("1")) { + return false; + } + + mInIsolatedMozBrowser = true; + return true; + } + + // Let OriginAttributes::PopulateFromSuffix parse other + // origin attributes. + return true; + }); if (!ok) { return false; } |