diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-10 23:57:07 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-10 23:57:07 +0000 |
commit | d9fac60990a817c7ef7f1a7beef90dc319bf299b (patch) | |
tree | 97aa53708de3ee8cd33bcc7a1504442561244994 /net/disk_cache/backend_impl.cc | |
parent | 89dbe690980344162fffc84c15a5f18e096b5981 (diff) | |
download | chromium_src-d9fac60990a817c7ef7f1a7beef90dc319bf299b.zip chromium_src-d9fac60990a817c7ef7f1a7beef90dc319bf299b.tar.gz chromium_src-d9fac60990a817c7ef7f1a7beef90dc319bf299b.tar.bz2 |
Disk cache: Avoid recursion when trimming entries.
TrimCacheV2() calls EvictEntry() to move a given entry to
the "deleted" list. EvictEntry() deletes the actual data,
and that may end up calling ModifyStorageSize() and
TrimCacheV2() again.
BUG=b/1909376
TEST=none
Review URL: http://codereview.chromium.org/121002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18115 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/backend_impl.cc')
-rw-r--r-- | net/disk_cache/backend_impl.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc index 63db6b1..be7292d 100644 --- a/net/disk_cache/backend_impl.cc +++ b/net/disk_cache/backend_impl.cc @@ -713,7 +713,7 @@ int BackendImpl::MaxFileSize() const { } void BackendImpl::ModifyStorageSize(int32 old_size, int32 new_size) { - if (disabled_) + if (disabled_ || old_size == new_size) return; if (old_size > new_size) SubstractStorageSize(old_size - new_size); |