| Index: net/http/http_cache_transaction.cc
|
| diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
|
| index 6be3d8711dc70b41ae8a3c269ff74d60e7cd61d5..e159cb9101d1b13a17fa43a295c56196ccc87fef 100644
|
| --- a/net/http/http_cache_transaction.cc
|
| +++ b/net/http/http_cache_transaction.cc
|
| @@ -1561,7 +1561,8 @@ int HttpCache::Transaction::DoSuccessfulSendRequest() {
|
|
|
| // Invalidate any cached GET with a successful PUT or DELETE.
|
| if (mode_ == WRITE && (method_ == "PUT" || method_ == "DELETE")) {
|
| - if (NonErrorResponse(new_response->headers->response_code())) {
|
| + if (NonErrorResponse(new_response->headers->response_code()) &&
|
| + (entry_ && !entry_->doomed)) {
|
| int ret = cache_->DoomEntry(cache_key_, NULL);
|
| DCHECK_EQ(OK, ret);
|
| }
|
| @@ -2846,8 +2847,10 @@ void HttpCache::Transaction::OnCacheLockTimeout(base::TimeTicks start_time) {
|
|
|
| void HttpCache::Transaction::DoomPartialEntry(bool delete_object) {
|
| DVLOG(2) << "DoomPartialEntry";
|
| - int rv = cache_->DoomEntry(cache_key_, NULL);
|
| - DCHECK_EQ(OK, rv);
|
| + if (entry_ && !entry_->doomed) {
|
| + int rv = cache_->DoomEntry(cache_key_, NULL);
|
| + DCHECK_EQ(OK, rv);
|
| + }
|
| cache_->DoneWithEntry(entry_, this, false /* process_cancel */,
|
| partial_ != nullptr);
|
| entry_ = NULL;
|
|
|