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 10:36:39 +00:00
Родитель 1f82932860
Коммит 184c0ca703
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -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;