diff options
author | orenb@chromium.org <orenb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-26 00:58:28 +0000 |
---|---|---|
committer | orenb@chromium.org <orenb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-26 00:58:28 +0000 |
commit | e776763aedb09113da63e157926749c8cc61d689 (patch) | |
tree | 1fe90d3e477574ff824363540188f2ec01fdc445 /net/disk_cache/sparse_control.cc | |
parent | 77c664ebe3452a4db188b6eaf105c2b97c23c4d7 (diff) | |
download | chromium_src-e776763aedb09113da63e157926749c8cc61d689.zip chromium_src-e776763aedb09113da63e157926749c8cc61d689.tar.gz chromium_src-e776763aedb09113da63e157926749c8cc61d689.tar.bz2 |
Added sanity check for entry in ReadyToUse
CID_COUNT=1
CID=103693
BUG=
TEST=
TBR=rvargas
Review URL: https://chromiumcodereview.appspot.com/10828025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148457 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/sparse_control.cc')
-rw-r--r-- | net/disk_cache/sparse_control.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/disk_cache/sparse_control.cc b/net/disk_cache/sparse_control.cc index 19f5b69..d68c29a 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); 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. |