Bug 1291347 - Make CacheFileContextEvictor::EvictEntries shutdown aware, r=honzab

This commit is contained in:
Michal Novotny 2016-08-09 20:29:40 +02:00
Родитель 8ca795c1c8
Коммит 67b220d054
1 изменённых файлов: 8 добавлений и 0 удалений

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

@ -553,6 +553,14 @@ CacheFileContextEvictor::EvictEntries()
}
while (true) {
if (CacheObserver::ShuttingDown()) {
LOG(("CacheFileContextEvictor::EvictEntries() - Stopping evicting due to "
"shutdown."));
mEvicting = true; // We don't want to start eviction again during shutdown
// process. Setting this flag to true ensures it.
return NS_OK;
}
if (CacheIOThread::YieldAndRerun()) {
LOG(("CacheFileContextEvictor::EvictEntries() - Breaking loop for higher "
"level events."));