diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-16 20:59:29 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-16 20:59:29 +0000 |
commit | 65188eb51c19157f9b360c84acbfa66543f0d781 (patch) | |
tree | 28d1816af4f58cd77fdaec56ab40a3c6c1dc8f95 /net/disk_cache/stats.cc | |
parent | f7fcceefed4e4817f3fca6fdd2156136662ae39b (diff) | |
download | chromium_src-65188eb51c19157f9b360c84acbfa66543f0d781.zip chromium_src-65188eb51c19157f9b360c84acbfa66543f0d781.tar.gz chromium_src-65188eb51c19157f9b360c84acbfa66543f0d781.tar.bz2 |
Disk cache: Fix the order in which we delete data
from the block files.
Stress testing the cache reveals a problem with the deletion
of some data from an entry: it is possible to crash in a way
that the block file thinks a block is free and an entry
thinks the block is in use. This CL corrects that issue.
There is also some new tests and a bunch of DCHECKS added
while looking for the problem, as well as adding tests to
make sure that a block file is accessed only from one thread
(there is no problem with the current code in that regard)
BUG=55605
TEST=netunittests
Review URL: http://codereview.chromium.org/3430004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59711 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/stats.cc')
-rw-r--r-- | net/disk_cache/stats.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/disk_cache/stats.cc b/net/disk_cache/stats.cc index e69ea00..b69e70d 100644 --- a/net/disk_cache/stats.cc +++ b/net/disk_cache/stats.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -147,8 +147,10 @@ bool Stats::Init(BackendImpl* backend, uint32* storage_addr) { return true; } +Stats::Stats() : backend_(NULL) { +} + Stats::~Stats() { - Store(); } // The array will be filled this way: |