Commit 6b8278e1 authored by Shivani Sharma's avatar Shivani Sharma Committed by Commit Bot

Empty entry to be destroyed in DoneWithEntry

Bug: 741116
Change-Id: I58cbe1714808fa9a36a322ff26e65b93259e288d
Reviewed-on: https://chromium-review.googlesource.com/574874
Commit-Queue: Shivani Sharma <shivanisha@chromium.org>
Reviewed-by: default avatarJosh Karlin <jkarlin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487268}
parent dc579148
...@@ -612,8 +612,7 @@ int HttpCache::DoomEntry(const std::string& key, Transaction* trans) { ...@@ -612,8 +612,7 @@ int HttpCache::DoomEntry(const std::string& key, Transaction* trans) {
entry_ptr->disk_entry->Doom(); entry_ptr->disk_entry->Doom();
entry_ptr->doomed = true; entry_ptr->doomed = true;
DCHECK(entry_ptr->writer || !entry_ptr->readers.empty() || DCHECK(!entry_ptr->HasNoTransactions() ||
entry_ptr->headers_transaction ||
entry_ptr->will_process_queued_transactions); entry_ptr->will_process_queued_transactions);
return OK; return OK;
} }
...@@ -915,6 +914,10 @@ void HttpCache::DoneWithEntry(ActiveEntry* entry, ...@@ -915,6 +914,10 @@ void HttpCache::DoneWithEntry(ActiveEntry* entry,
// Restart already validated transactions so that they are able to read // Restart already validated transactions so that they are able to read
// the truncated status of the entry. // the truncated status of the entry.
RestartHeadersPhaseTransactions(entry, transaction); RestartHeadersPhaseTransactions(entry, transaction);
if (entry->HasNoTransactions() &&
!entry->will_process_queued_transactions) {
DestroyEntry(entry);
}
return; return;
} }
DoneWritingToEntry(entry, success && !did_truncate, transaction); DoneWritingToEntry(entry, success && !did_truncate, transaction);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment