Bug 1429169 - Facilitate testing of cookie-related enterprise policy by always firing the cookie-db-read event r=jimm

There seems to be no reason to conditionally fire the cookie-db-read event. Currently it is not fired if no cookies were read. There seems to be only one other consumer of this event (a test) which should work fine if the event were fired every time. This change would eliminate a particularly ugly workaround in cookie-related policy testing.

MozReview-Commit-ID: FbD1cvsBZBO

--HG--
extra : rebase_source : ff5049f36c7f3df3ad182ebb1a6ccc5db1032e23
This commit is contained in:
Kirk Steuber 2018-03-20 14:56:02 -07:00
Родитель 8b1819017d
Коммит 544cf05b75
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -1485,7 +1485,7 @@ nsCookieService::InitDBConn()
mEndInitDBConn = mozilla::TimeStamp::Now();
nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
if (os && !mReadArray.IsEmpty()) {
if (os) {
os->NotifyObservers(nullptr, "cookie-db-read", nullptr);
mReadArray.Clear();
}