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

Unified Diff: net/disk_cache/sparse_control.cc

Issue 10828025: Added sanity check for entry in SparseControl::DeleteChildren (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/disk_cache/sparse_control.cc
diff --git a/net/disk_cache/sparse_control.cc b/net/disk_cache/sparse_control.cc
index 19f5b69d8721a80b2638f1be71b72cd1d3ca5741..d68c29a692f681f7e3ce1a661ce51b1240e49a2c 100644
--- a/net/disk_cache/sparse_control.cc
+++ b/net/disk_cache/sparse_control.cc
@@ -332,6 +332,7 @@ int SparseControl::ReadyToUse(const CompletionCallback& callback) {
// Static
void SparseControl::DeleteChildren(EntryImpl* entry) {
+ DCHECK(entry);
rvargas (doing something else) 2012/07/26 00:03:14 Actually, removing the DCHECK makes more sense. We
DCHECK(entry->GetEntryFlags() & PARENT_ENTRY);
int data_len = entry->GetDataSize(kSparseIndex);
if (data_len < static_cast<int>(sizeof(SparseData)) ||
@@ -350,7 +351,7 @@ void SparseControl::DeleteChildren(EntryImpl* entry) {
entry->net_log().AddEvent(net::NetLog::TYPE_SPARSE_DELETE_CHILDREN);
- DCHECK(entry && entry->backend_);
+ DCHECK(entry->backend_);
ChildrenDeleter* deleter = new ChildrenDeleter(entry->backend_,
entry->GetKey());
// The object will self destruct when finished.
« 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