Chromium Code Reviews| Index: net/http/http_cache_transaction.cc |
| diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc |
| index 9af0c83720d88292039da51d2f74ca25159907d0..d2faa21691d97f1198b1c53315e9646abea97cd7 100644 |
| --- a/net/http/http_cache_transaction.cc |
| +++ b/net/http/http_cache_transaction.cc |
| @@ -1030,7 +1030,7 @@ int HttpCache::Transaction::DoUpdateCachedResponseComplete(int result) { |
| DoneWritingToEntry(true); |
| } else if (entry_ && !server_responded_206_) { |
| DCHECK_EQ(READ_WRITE, mode_); |
| - if (!partial_.get() || partial_->IsLastRange()) { |
| + if (entry_ && !partial_.get() || partial_->IsLastRange()) { |
|
rvargas (doing something else)
2011/06/23 19:00:27
entry_ is already considered at line 1031
Greg Billock
2011/06/23 20:13:25
Done.
|
| cache_->ConvertWriterToReader(entry_); |
| mode_ = READ; |
| } |
| @@ -1513,8 +1513,10 @@ int HttpCache::Transaction::BeginCacheValidation() { |
| next_state_ = STATE_PARTIAL_HEADERS_RECEIVED; |
| return OK; |
| } |
| - cache_->ConvertWriterToReader(entry_); |
| - mode_ = READ; |
| + if (entry_) { |
|
rvargas (doing something else)
2011/06/23 19:00:27
The state machine guarantees that there should be
Greg Billock
2011/06/23 20:13:25
Done. I'll mark this intentional in coverity.
|
| + cache_->ConvertWriterToReader(entry_); |
| + mode_ = READ; |
| + } |
| if (entry_ && entry_->disk_entry->GetDataSize(kMetadataIndex)) |
| next_state_ = STATE_CACHE_READ_METADATA; |