diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-27 05:25:30 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-27 05:25:30 +0000 |
commit | 9c972f5024021bf4e3e9de1091bb430048abef97 (patch) | |
tree | 711b0fd86f1387ea94f9a9ce425f72ee9191416b | |
parent | dca3212a3573dc555bf64db9354911f0e77875c4 (diff) | |
download | chromium_src-9c972f5024021bf4e3e9de1091bb430048abef97.zip chromium_src-9c972f5024021bf4e3e9de1091bb430048abef97.tar.gz chromium_src-9c972f5024021bf4e3e9de1091bb430048abef97.tar.bz2 |
Fix DiskCacheEntryTest.MemoryOnlyDoomSparseEntry
BUG=12258
TEST=DiskCacheEntryTest.MemoryOnlyDoomSparseEntry
The sequence that caused this test to break was to doom to the entry while
it is still opened. Since closing the parent entry only delete itself and
then child entries are not cleaned up. This is corrected by using
InternalDoom() for destruction.
Review URL: http://codereview.chromium.org/174592
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24594 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | net/disk_cache/entry_unittest.cc | 2 | ||||
-rw-r--r-- | net/disk_cache/mem_entry_impl.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/disk_cache/entry_unittest.cc b/net/disk_cache/entry_unittest.cc index 7f8d53d..1c81995 100644 --- a/net/disk_cache/entry_unittest.cc +++ b/net/disk_cache/entry_unittest.cc @@ -1202,7 +1202,7 @@ TEST_F(DiskCacheEntryTest, DoomSparseEntry) { DoomSparseEntry(); } -TEST_F(DiskCacheEntryTest, DISABLED_MemoryOnlyDoomSparseEntry) { +TEST_F(DiskCacheEntryTest, MemoryOnlyDoomSparseEntry) { SetMemoryOnlyMode(); InitCache(); DoomSparseEntry(); diff --git a/net/disk_cache/mem_entry_impl.cc b/net/disk_cache/mem_entry_impl.cc index bf6359d..7b15446 100644 --- a/net/disk_cache/mem_entry_impl.cc +++ b/net/disk_cache/mem_entry_impl.cc @@ -69,7 +69,7 @@ void MemEntryImpl::Close() { ref_count_--; DCHECK(ref_count_ >= 0); if (!ref_count_ && doomed_) - delete this; + InternalDoom(); } void MemEntryImpl::Open() { |