summaryrefslogtreecommitdiffstats
path: root/net/http/http_cache_transaction.cc
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-02 18:07:46 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-02 18:07:46 +0000
commitfa59e6afced683747d18e187d516190deedee5c5 (patch)
treed5bf11dd5b097a2a15c6a5cecb7dfceb461e82bf /net/http/http_cache_transaction.cc
parent55e7f110693cf904e12231a9682678aa77360694 (diff)
downloadchromium_src-fa59e6afced683747d18e187d516190deedee5c5.zip
chromium_src-fa59e6afced683747d18e187d516190deedee5c5.tar.gz
chromium_src-fa59e6afced683747d18e187d516190deedee5c5.tar.bz2
Http cache: Don't access entry_ if an error switches
the transaction to mode NONE and deletes the entry_. BUG=28994 TEST=unittests Review URL: http://codereview.chromium.org/449069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33580 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_cache_transaction.cc')
-rw-r--r--net/http/http_cache_transaction.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index 047bc73..b42bf22 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -1233,9 +1233,10 @@ int HttpCache::Transaction::DoPartialCacheReadCompleted(int result) {
if (partial_.get() && mode_ == READ_WRITE) {
// We need to move on to the next range.
result = ContinuePartialCacheValidation();
- if (result != OK)
+ if (result != OK || !entry_) {
// Any error was already handled.
return result;
+ }
cache_->ConvertWriterToReader(entry_);
}
cache_->DoneReadingFromEntry(entry_, this);