Commit 332b0937 authored by Robert Longson's avatar Robert Longson
Browse files

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

parent c4aad864
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -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;
    }

+0 −2
Original line number Diff line number Diff line
@@ -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”.