diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-28 18:23:52 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-28 18:23:52 +0000 |
commit | d5cca803924422ff8cfc6dadd8ac6b4dd309a68d (patch) | |
tree | cf195a36b15976ff073103d00572ede0784fc197 /net | |
parent | 807466e3f65de86bbdd1197c07a2c27712d6e1ba (diff) | |
download | chromium_src-d5cca803924422ff8cfc6dadd8ac6b4dd309a68d.zip chromium_src-d5cca803924422ff8cfc6dadd8ac6b4dd309a68d.tar.gz chromium_src-d5cca803924422ff8cfc6dadd8ac6b4dd309a68d.tar.bz2 |
Http cache: Remove a race between the http cache destructor
deleting the pending operations, and the disk cache using data
backed by the pending operation.
BUG=87396
TEST=none
Review URL: http://codereview.chromium.org/7277009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90802 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/http/http_cache.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc index fbc6461..cf533e8 100644 --- a/net/http/http_cache.cc +++ b/net/http/http_cache.cc @@ -383,6 +383,10 @@ HttpCache::~HttpCache() { STLDeleteElements(&doomed_entries_); + // Before deleting pending_ops_, we have to make sure that the disk cache is + // done with said operations, or it will attempt to use deleted data. + disk_cache_.reset(); + PendingOpsMap::iterator pending_it = pending_ops_.begin(); for (; pending_it != pending_ops_.end(); ++pending_it) { // We are not notifying the transactions about the cache going away, even |