зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 14d6dd504f86 (bug 1534339) for causing Bug 1595179. CLOSED TREE
--HG-- extra : rebase_source : 101262411debddee38453d05fdfb7327fe03438e extra : histedit_source : 1ddb09ebad301dfc19bccf12386e7d0beb43cb1a
This commit is contained in:
Родитель
64a0fd0a54
Коммит
33799b6110
|
@ -13,9 +13,6 @@
|
|||
#include "nsIURI.h"
|
||||
#include "nsURLHelper.h"
|
||||
|
||||
static const char kSourceChar = ':';
|
||||
static const char kSanitizedChar = '+';
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
using dom::URLParams;
|
||||
|
@ -148,7 +145,8 @@ void OriginAttributes::CreateSuffix(nsACString& aStr) const {
|
|||
|
||||
if (!mFirstPartyDomain.IsEmpty()) {
|
||||
nsAutoString sanitizedFirstPartyDomain(mFirstPartyDomain);
|
||||
sanitizedFirstPartyDomain.ReplaceChar(kSourceChar, kSanitizedChar);
|
||||
sanitizedFirstPartyDomain.ReplaceChar(
|
||||
dom::quota::QuotaManager::kReplaceChars, '+');
|
||||
|
||||
params.Set(NS_LITERAL_STRING("firstPartyDomain"),
|
||||
sanitizedFirstPartyDomain);
|
||||
|
@ -157,7 +155,7 @@ void OriginAttributes::CreateSuffix(nsACString& aStr) const {
|
|||
if (!mGeckoViewSessionContextId.IsEmpty()) {
|
||||
nsAutoString sanitizedGeckoViewUserContextId(mGeckoViewSessionContextId);
|
||||
sanitizedGeckoViewUserContextId.ReplaceChar(
|
||||
dom::quota::QuotaManager::kReplaceChars, kSanitizedChar);
|
||||
dom::quota::QuotaManager::kReplaceChars, '+');
|
||||
|
||||
params.Set(NS_LITERAL_STRING("geckoViewUserContextId"),
|
||||
sanitizedGeckoViewUserContextId);
|
||||
|
@ -245,9 +243,7 @@ class MOZ_STACK_CLASS PopulateFromSuffixIterator final
|
|||
|
||||
if (aName.EqualsLiteral("firstPartyDomain")) {
|
||||
MOZ_RELEASE_ASSERT(mOriginAttributes->mFirstPartyDomain.IsEmpty());
|
||||
nsAutoString firstPartyDomain(aValue);
|
||||
firstPartyDomain.ReplaceChar(kSanitizedChar, kSourceChar);
|
||||
mOriginAttributes->mFirstPartyDomain.Assign(firstPartyDomain);
|
||||
mOriginAttributes->mFirstPartyDomain.Assign(aValue);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,8 +26,6 @@ static void TestFPD(const nsAString& spec, const nsAString& fpd) {
|
|||
ASSERT_EQ(NS_NewURI(getter_AddRefs(url), spec), NS_OK);
|
||||
attrs.SetFirstPartyDomain(true, url);
|
||||
EXPECT_TRUE(attrs.mFirstPartyDomain.Equals(fpd));
|
||||
|
||||
TestSuffix(attrs);
|
||||
}
|
||||
|
||||
TEST(OriginAttributes, Suffix_default)
|
||||
|
|
Загрузка…
Ссылка в новой задаче