diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-03 17:59:47 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-03 17:59:47 +0000 |
commit | f889b65a91ed110ba84a75b3d6c6c87f77367c5e (patch) | |
tree | dc0c0dfe01acb8b40c9652b71588603574cb7030 /net/disk_cache/entry_impl.cc | |
parent | 430b7d6f6e3041d956457a0ff671a62759805d8d (diff) | |
download | chromium_src-f889b65a91ed110ba84a75b3d6c6c87f77367c5e.zip chromium_src-f889b65a91ed110ba84a75b3d6c6c87f77367c5e.tar.gz chromium_src-f889b65a91ed110ba84a75b3d6c6c87f77367c5e.tar.bz2 |
Disk cache: Flush the data for child entries before starting
to delete the parent (sparse) entry.
BUG=64954
TEST=net_unittests
Review URL: http://codereview.chromium.org/5585004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68186 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/entry_impl.cc')
-rw-r--r-- | net/disk_cache/entry_impl.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/disk_cache/entry_impl.cc b/net/disk_cache/entry_impl.cc index ce59270..e5e6482 100644 --- a/net/disk_cache/entry_impl.cc +++ b/net/disk_cache/entry_impl.cc @@ -296,11 +296,15 @@ EntryImpl::EntryImpl(BackendImpl* backend, Addr address, bool read_only) // written before). EntryImpl::~EntryImpl() { Log("~EntryImpl in"); - backend_->OnEntryDestroyBegin(entry_.address()); - // Save the sparse info to disk before deleting this entry. + // Save the sparse info to disk. This will generate IO for this entry and + // maybe for a child entry, so it is important to do it before deleting this + // entry. sparse_.reset(); + // Remove this entry from the list of open entries. + backend_->OnEntryDestroyBegin(entry_.address()); + if (doomed_) { DeleteEntryData(true); } else { |