Bug 1676651 - don't warn to console if a cookie is deleted r=dveditz

Differential Revision: https://phabricator.services.mozilla.com/D175563
This commit is contained in:
Robert Longson 2023-04-28 14:33:34 +00:00
Родитель c4aad864d0
Коммит 332b093789
2 изменённых файлов: 0 добавлений и 20 удалений

Просмотреть файл

@ -449,12 +449,6 @@ void CookieStorage::AddCookie(nsIConsoleReportCollector* aCRC,
// The new cookie has expired and the old one is stale. Nothing to do.
COOKIE_LOGFAILURE(SET_COOKIE, aHostURI, aCookieHeader,
"cookie has already expired");
CookieLogging::LogMessageToConsole(
aCRC, aHostURI, nsIScriptError::warningFlag,
CONSOLE_REJECTION_CATEGORY, "CookieRejectedExpired"_ns,
AutoTArray<nsString, 1>{
NS_ConvertUTF8toUTF16(aCookie->Name()),
});
return;
}
@ -519,12 +513,6 @@ void CookieStorage::AddCookie(nsIConsoleReportCollector* aCRC,
if (aCookie->Expiry() <= currentTime) {
COOKIE_LOGFAILURE(SET_COOKIE, aHostURI, aCookieHeader,
"previously stored cookie was deleted");
CookieLogging::LogMessageToConsole(
aCRC, aHostURI, nsIScriptError::warningFlag,
CONSOLE_REJECTION_CATEGORY, "CookieRejectedExpired"_ns,
AutoTArray<nsString, 1>{
NS_ConvertUTF8toUTF16(aCookie->Name()),
});
NotifyChanged(oldCookie, u"deleted", oldCookieIsSession);
return;
}
@ -538,12 +526,6 @@ void CookieStorage::AddCookie(nsIConsoleReportCollector* aCRC,
if (aCookie->Expiry() <= currentTime) {
COOKIE_LOGFAILURE(SET_COOKIE, aHostURI, aCookieHeader,
"cookie has already expired");
CookieLogging::LogMessageToConsole(
aCRC, aHostURI, nsIScriptError::warningFlag,
CONSOLE_REJECTION_CATEGORY, "CookieRejectedExpired"_ns,
AutoTArray<nsString, 1>{
NS_ConvertUTF8toUTF16(aCookie->Name()),
});
return;
}

Просмотреть файл

@ -80,8 +80,6 @@ CookieRejectedSecureButNonHttps=Cookie “%1$S” has been rejected because a no
CookieRejectedThirdParty=Cookie “%1$S” has been rejected as third-party.
# LOCALIZATION NOTE (CookieRejectedNonsecureOverSecure): %1$S is the cookie name.
CookieRejectedNonsecureOverSecure=Cookie “%1$S” has been rejected because there is an existing “secure” cookie.
# LOCALIZATION NOTE (CookieRejectedExpired): %1$S is the cookie name.
CookieRejectedExpired=Cookie “%1$S” has been rejected because it is already expired.
# LOCALIZATION NOTE (CookieRejectedForNonSameSiteness): %1$S is the cookie name.
CookieRejectedForNonSameSiteness=Cookie “%1$S” has been rejected because it is in a cross-site context and its “SameSite” is “Lax” or “Strict”.