summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/backend_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/disk_cache/backend_impl.cc')
-rw-r--r--net/disk_cache/backend_impl.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc
index e997b90..5c64d01 100644
--- a/net/disk_cache/backend_impl.cc
+++ b/net/disk_cache/backend_impl.cc
@@ -788,6 +788,10 @@ void BackendImpl::CriticalError(int error) {
LogStats();
ReportError(error);
+ // Reset the mask_ if it was not given by the user.
+ if (mask_ == data_->header.table_len - 1)
+ mask_ = 0;
+
// Setting the index table length to an invalid value will force re-creation
// of the cache files.
data_->header.table_len = 1;
@@ -983,6 +987,10 @@ void BackendImpl::RestartCache() {
}
void BackendImpl::PrepareForRestart() {
+ // Reset the mask_ if it was not given by the user.
+ if (mask_ == data_->header.table_len - 1)
+ mask_ = 0;
+
data_->header.crash = 0;
index_ = NULL;
data_ = NULL;