Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Unified Diff: net/http/http_cache.cc

Issue 159563: Http cache: dump the transaction and active entry key... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache.cc
===================================================================
--- net/http/http_cache.cc (revision 21923)
+++ net/http/http_cache.cc (working copy)
@@ -1597,16 +1597,20 @@
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());
+ std::string key = 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_) {
bool local_mem_flag = in_memory_cache_;
ActiveEntriesSet::iterator it2 = doomed_entries_.find(entry);
+ char local_key[64];
+ int key_length = key.size();
+ base::strlcpy(local_key, key.c_str(), sizeof(local_key));
CHECK(it2 == doomed_entries_.end());
CHECK(!deleted_);
CHECK(local_mem_flag);
+ CHECK(key_length);
CHECK(false);
}
@@ -1677,6 +1681,9 @@
char local_transaction[sizeof(*trans)];
memcpy(local_transaction, trans, sizeof(*trans));
+ char local_key[64];
+ base::strlcpy(local_key, trans->key().c_str(), sizeof(local_key));
+
// Assume that this is not a successful write.
DoneWritingToEntry(entry, false);
} else {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698