diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-23 23:14:57 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-23 23:14:57 +0000 |
commit | 3d7fb3f19af90d93defee20a98776f0a517dcb5a (patch) | |
tree | 37e5a7a370c06d81d1dcc9fe490b40ca61b4bb7c /net | |
parent | dd576af62d44b9aaaefedbfe78822f6c83e4f310 (diff) | |
download | chromium_src-3d7fb3f19af90d93defee20a98776f0a517dcb5a.zip chromium_src-3d7fb3f19af90d93defee20a98776f0a517dcb5a.tar.gz chromium_src-3d7fb3f19af90d93defee20a98776f0a517dcb5a.tar.bz2 |
Disk cache: Small adjustment so that we continue with
the process of creating a new entry after we detect a
dirty entry with a partial hash collision.
Detected with stress_cache.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3404013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60376 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/disk_cache/backend_impl.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc index 5a762af..1446711 100644 --- a/net/disk_cache/backend_impl.cc +++ b/net/disk_cache/backend_impl.cc @@ -817,11 +817,13 @@ EntryImpl* BackendImpl::CreateEntryImpl(const std::string& key) { return ResurrectEntry(old_entry); EntryImpl* parent_entry = MatchEntry(key, hash, true); - if (!parent_entry) { + if (parent_entry) { + parent.swap(&parent_entry); + } else if (data_->table[hash & mask_]) { + // We should have corrected the problem. NOTREACHED(); return NULL; } - parent.swap(&parent_entry); } int num_blocks; |