| Index: net/http/http_cache.cc
|
| ===================================================================
|
| --- net/http/http_cache.cc (revision 23344)
|
| +++ net/http/http_cache.cc (working copy)
|
| @@ -1731,14 +1731,17 @@
|
| #endif
|
| // Avoid optimizing local_entry out of the code.
|
| void HttpCache::DeactivateEntry(ActiveEntry* entry) {
|
| + std::string key = entry->disk_entry->GetKey();
|
| + if (key.empty())
|
| + return SlowDeactivateEntry(entry);
|
| +
|
| // TODO(rvargas): remove this code and go back to DCHECKS once we find out
|
| // why are we crashing. I'm just trying to gather more info for bug 3931.
|
| ActiveEntry local_entry = *entry;
|
| size_t readers_size = local_entry.readers.size();
|
| size_t pending_size = local_entry.pending_queue.size();
|
|
|
| - ActiveEntriesMap::iterator it =
|
| - active_entries_.find(entry->disk_entry->GetKey());
|
| + ActiveEntriesMap::iterator it = active_entries_.find(key);
|
| if (it == active_entries_.end() || it->second != entry ||
|
| local_entry.will_process_pending_queue || local_entry.doomed ||
|
| local_entry.writer || readers_size || pending_size || deleted_) {
|
| @@ -1760,6 +1763,18 @@
|
| #pragma optimize("", on)
|
| #endif
|
|
|
| +// We don't know this entry's key so we have to find it without it.
|
| +void HttpCache::SlowDeactivateEntry(ActiveEntry* entry) {
|
| + for (ActiveEntriesMap::iterator it = active_entries_.begin();
|
| + it != active_entries_.end(); ++it) {
|
| + if (it->second == entry) {
|
| + active_entries_.erase(it);
|
| + delete entry;
|
| + break;
|
| + }
|
| + }
|
| +}
|
| +
|
| int HttpCache::AddTransactionToEntry(ActiveEntry* entry, Transaction* trans) {
|
| DCHECK(entry);
|
|
|
|
|
| Property changes on: net\http\http_cache.cc
|
| ___________________________________________________________________
|
| Modified: svn:mergeinfo
|
| Merged /trunk/src/net/http/http_cache.cc:r22701
|
|
|
|
|