summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/simple/simple_entry_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/disk_cache/simple/simple_entry_impl.cc')
-rw-r--r--net/disk_cache/simple/simple_entry_impl.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/disk_cache/simple/simple_entry_impl.cc b/net/disk_cache/simple/simple_entry_impl.cc
index 4823dda..3a54a1f 100644
--- a/net/disk_cache/simple/simple_entry_impl.cc
+++ b/net/disk_cache/simple/simple_entry_impl.cc
@@ -262,6 +262,8 @@ int SimpleEntryImpl::CreateEntry(Entry** out_entry,
}
int SimpleEntryImpl::DoomEntry(const CompletionCallback& callback) {
+ if (doomed_)
+ return net::OK;
net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_DOOM_CALL);
net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_DOOM_BEGIN);
@@ -558,9 +560,9 @@ void SimpleEntryImpl::RemoveSelfFromBackend() {
}
void SimpleEntryImpl::MarkAsDoomed() {
+ doomed_ = true;
if (!backend_.get())
return;
- doomed_ = true;
backend_->index()->Remove(entry_hash_);
RemoveSelfFromBackend();
}