Bug 1915419 - CSSCacheCleaner, JSCacheCleaner support for OriginAttributesPattern. r=emilio,anti-tracking-reviewers,timhuang

Differential Revision: https://phabricator.services.mozilla.com/D220713
This commit is contained in:
Paul Zuehlcke
2024-09-16 13:25:32 +00:00
parent 8dc3f9fdd6
commit 2ac59307af
14 changed files with 198 additions and 82 deletions

View File

@@ -1361,12 +1361,14 @@ void ChromeUtils::ClearRecentJSDevError(GlobalObject&) {
void ChromeUtils::ClearStyleSheetCacheByPrincipal(GlobalObject&,
nsIPrincipal* aForPrincipal) {
SharedStyleSheetCache::Clear(aForPrincipal);
SharedStyleSheetCache::Clear(Some(aForPrincipal));
}
void ChromeUtils::ClearStyleSheetCacheByBaseDomain(
GlobalObject&, const nsACString& aBaseDomain) {
SharedStyleSheetCache::Clear(nullptr, &aBaseDomain);
void ChromeUtils::ClearStyleSheetCacheBySite(
GlobalObject&, const nsACString& aSchemelessSite,
const dom::OriginAttributesPatternDictionary& aPattern) {
SharedStyleSheetCache::Clear(Nothing(), Some(nsCString(aSchemelessSite)),
Some(OriginAttributesPattern(aPattern)));
}
void ChromeUtils::ClearStyleSheetCache(GlobalObject&) {
@@ -1375,12 +1377,14 @@ void ChromeUtils::ClearStyleSheetCache(GlobalObject&) {
void ChromeUtils::ClearScriptCacheByPrincipal(GlobalObject&,
nsIPrincipal* aForPrincipal) {
SharedScriptCache::Clear(aForPrincipal);
SharedScriptCache::Clear(Some(aForPrincipal));
}
void ChromeUtils::ClearScriptCacheByBaseDomain(GlobalObject&,
const nsACString& aBaseDomain) {
SharedScriptCache::Clear(nullptr, &aBaseDomain);
void ChromeUtils::ClearScriptCacheBySite(
GlobalObject&, const nsACString& aSchemelessSite,
const dom::OriginAttributesPatternDictionary& aPattern) {
SharedScriptCache::Clear(Nothing(), Some(nsCString(aSchemelessSite)),
Some(aPattern));
}
void ChromeUtils::ClearScriptCache(GlobalObject&) {