| Index: net/dns/host_cache.cc
|
| diff --git a/net/dns/host_cache.cc b/net/dns/host_cache.cc
|
| index 1ff1755e8b11da77060185ce61828da4c2f196a4..0026c02176c03c8c5dc28ba463000d4d8699d890 100644
|
| --- a/net/dns/host_cache.cc
|
| +++ b/net/dns/host_cache.cc
|
| @@ -253,8 +253,11 @@ void HostCache::EvictOneEntry(base::TimeTicks now) {
|
|
|
| auto oldest_it = entries_.begin();
|
| for (auto it = entries_.begin(); it != entries_.end(); ++it) {
|
| - if (it->second.expires() < oldest_it->second.expires())
|
| + if ((it->second.expires() < oldest_it->second.expires()) &&
|
| + (it->second.IsStale(now, network_changes_) ||
|
| + !oldest_it->second.IsStale(now, network_changes_))) {
|
| oldest_it = it;
|
| + }
|
| }
|
|
|
| if (!eviction_callback_.is_null())
|
|
|