summaryrefslogtreecommitdiffstats
path: root/dom/quota/StorageOriginAttributes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/quota/StorageOriginAttributes.cpp')
-rw-r--r--dom/quota/StorageOriginAttributes.cpp39
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;
}