Fix #13042: Make sure all cookies are saved

This commit is contained in:
Mark Hellegers
2016-10-30 20:23:43 +01:00
committed by Adrien Destugues
parent 8950e6dc9a
commit a61218b10d
@@ -603,6 +603,13 @@ BNetworkCookieJar::Iterator::NextDomain()
fList = *fIterator->fCookieMapIterator.NextValue();
fList->LockForReading();
while (fList->CountItems() == 0 && fIterator->fCookieMapIterator.HasNext()) {
// Empty list. Skip it
fList->Unlock();
fList = *fIterator->fCookieMapIterator.NextValue();
fList->LockForReading();
}
fCookieJar->fCookieHashMap->Unlock();
}
@@ -686,6 +693,13 @@ BNetworkCookieJar::Iterator::_FindNext()
fList = *(fIterator->fCookieMapIterator.NextValue());
fList->LockForReading();
while (fList->CountItems() == 0 && fIterator->fCookieMapIterator.HasNext()) {
// Empty list. Skip it
fList->Unlock();
fList = *fIterator->fCookieMapIterator.NextValue();
fList->LockForReading();
}
fCookieJar->fCookieHashMap->Unlock();
}