Backed out 7 changesets (bug 1915355) for causing performance regressions CLOSED TREE

Backed out changeset 77b4cc920fe4 (bug 1915355)
Backed out changeset da9446e06954 (bug 1915355)
Backed out changeset 20708fe16d2a (bug 1915355)
Backed out changeset 7c4b003d1e48 (bug 1915355)
Backed out changeset 36163490219b (bug 1915355)
Backed out changeset 8f867025b79b (bug 1915355)
Backed out changeset 3d647f81adb9 (bug 1915355)
This commit is contained in:
Alexandru Marc
2024-12-30 13:02:45 +02:00
parent c814f3818a
commit 0c1f8f4e28
47 changed files with 128 additions and 1661 deletions

View File

@@ -61,7 +61,7 @@ static void PopulateTopLevelInfoFromURI(const bool aIsTopLevelDocument,
bool aForeignByAncestorContext,
bool aIsFirstPartyEnabled, bool aForced,
bool aUseSite,
nsString OriginAttributes::* aTarget,
nsString OriginAttributes::*aTarget,
OriginAttributes& aOriginAttributes) {
nsresult rv;
@@ -514,23 +514,4 @@ bool OriginAttributes::ParsePartitionKey(const nsAString& aPartitionKey,
return fieldIndex > 1;
}
/* static */
bool OriginAttributes::ExtractSiteFromPartitionKey(
const nsAString& aPartitionKey, nsAString& aOutSite) {
nsAutoString scheme, host;
int32_t port;
bool unused;
if (!ParsePartitionKey(aPartitionKey, scheme, host, port, unused)) {
return false;
}
if (port == -1) {
aOutSite.Assign(scheme + u"://"_ns + host);
} else {
aOutSite.Assign(scheme + u"://"_ns + host + u":"_ns);
aOutSite.AppendInt(port);
}
return true;
}
} // namespace mozilla

View File

@@ -141,11 +141,6 @@ class OriginAttributes : public dom::OriginAttributesDictionary {
nsAString& outScheme, nsAString& outBaseDomain,
int32_t& outPort,
bool& outForeignByAncestorContext);
// Parse a partitionKey and extract the site from it. Returns false if the
// partitionKey cannot be parsed because the format is invalid.
static bool ExtractSiteFromPartitionKey(const nsAString& aPartitionKey,
nsAString& aOutSite);
};
class OriginAttributesPattern : public dom::OriginAttributesPatternDictionary {