Bug 1540117 - Part 1: Do not generate a console warning when we reject an attempt to retrieve a cookie for a host that has none stored; r=baku

Differential Revision: https://phabricator.services.mozilla.com/D43270

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ehsan Akhgari 2019-08-27 15:10:45 +00:00
parent 4bc6381510
commit 6ed82c152f

View File

@ -3035,7 +3035,10 @@ void nsCookieService::GetCookiesForURI(
// (but not if there was an error)
switch (cookieStatus) {
case STATUS_REJECTED:
NotifyRejected(aHostURI, aChannel, rejectedReason, OPERATION_READ);
// If we don't have any cookies from this host, fail silently.
if (priorCookieCount) {
NotifyRejected(aHostURI, aChannel, rejectedReason, OPERATION_READ);
}
return;
default:
break;