From 332b093789be382fd83ee2285fa2fcbe22123ae0 Mon Sep 17 00:00:00 2001 From: Robert Longson Date: Fri, 28 Apr 2023 14:33:34 +0000 Subject: [PATCH] Bug 1676651 - don't warn to console if a cookie is deleted r=dveditz Differential Revision: https://phabricator.services.mozilla.com/D175563 --- netwerk/cookie/CookieStorage.cpp | 18 ------------------ netwerk/locales/en-US/necko.properties | 2 -- 2 files changed, 20 deletions(-) diff --git a/netwerk/cookie/CookieStorage.cpp b/netwerk/cookie/CookieStorage.cpp index 606e339c7bb4..b1c4f7a316a6 100644 --- a/netwerk/cookie/CookieStorage.cpp +++ b/netwerk/cookie/CookieStorage.cpp @@ -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{ - 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{ - 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{ - NS_ConvertUTF8toUTF16(aCookie->Name()), - }); return; } diff --git a/netwerk/locales/en-US/necko.properties b/netwerk/locales/en-US/necko.properties index fcf4eb62e65e..39ab54c28ebe 100644 --- a/netwerk/locales/en-US/necko.properties +++ b/netwerk/locales/en-US/necko.properties @@ -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”.