Fix #13042: Make sure all cookies are saved

This commit is contained in:
Mark Hellegers 2016-10-30 15:30:50 +00:00 committed by Adrien Destugues
parent 8950e6dc9a
commit a61218b10d

View File

@ -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();
}