Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Unified Diff: net/disk_cache/simple/simple_entry_impl.cc

Issue 23591048: Fix Simple Cache race on multiple dooms in flight. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/backend_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_entry_impl.cc
diff --git a/net/disk_cache/simple/simple_entry_impl.cc b/net/disk_cache/simple/simple_entry_impl.cc
index 3a54a1fa4c0e79d2dd1f7173b5f4aef272fbc4a5..7f478acad5741764eb3c24a16f5880cdc56e56e6 100644
--- a/net/disk_cache/simple/simple_entry_impl.cc
+++ b/net/disk_cache/simple/simple_entry_impl.cc
@@ -565,6 +565,7 @@ void SimpleEntryImpl::MarkAsDoomed() {
return;
backend_->index()->Remove(entry_hash_);
RemoveSelfFromBackend();
+ backend_->OnDoomStart(entry_hash_);
gavinp 2013/09/16 12:40:12 This is a bug. We should only do this on actual do
}
void SimpleEntryImpl::RunNextOperationIfNeeded() {
@@ -917,8 +918,6 @@ void SimpleEntryImpl::WriteDataInternal(int stream_index,
}
void SimpleEntryImpl::DoomEntryInternal(const CompletionCallback& callback) {
- if (backend_)
- backend_->OnDoomStart(entry_hash_);
PostTaskAndReplyWithResult(
worker_pool_, FROM_HERE,
base::Bind(&SimpleSynchronousEntry::DoomEntry, path_, key_, entry_hash_),
« no previous file with comments | « net/disk_cache/backend_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698