Bug 1083922 - Doom entry when parsing security info fails. r=mcmanus, a=lmandel
authorMichal Novotny <michal.novotny@gmail.com>
Fri, 24 Oct 2014 23:44:59 +0200
changeset 225820 34988fa0f0d8
parent 225819 2e54d90546ce
child 225821 410afcc51b13
push id4026
push userryanvm@gmail.com
push date2014-10-26 22:32 +0000
treeherdermozilla-beta@410afcc51b13 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus, lmandel
bugs1083922
milestone34.0
Bug 1083922 - Doom entry when parsing security info fails. r=mcmanus, a=lmandel
netwerk/protocol/http/nsHttpChannel.cpp
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -3406,27 +3406,29 @@ nsHttpChannel::OpenCacheInputStream(nsIC
 
     if (usingSSL) {
         rv = cacheEntry->GetSecurityInfo(
                                       getter_AddRefs(mCachedSecurityInfo));
         if (NS_FAILED(rv)) {
             LOG(("failed to parse security-info [channel=%p, entry=%p]",
                  this, cacheEntry));
             NS_WARNING("failed to parse security-info");
+            cacheEntry->AsyncDoom(nullptr);
             return rv;
         }
 
         // XXX: We should not be skilling this check in the offline cache
         // case, but we have to do so now to work around bug 794507.
         bool mustHaveSecurityInfo = !mLoadedFromApplicationCache && !checkingAppCacheEntry;
         MOZ_ASSERT(mCachedSecurityInfo || !mustHaveSecurityInfo);
         if (!mCachedSecurityInfo && mustHaveSecurityInfo) {
             LOG(("mCacheEntry->GetSecurityInfo returned success but did not "
                  "return the security info [channel=%p, entry=%p]",
                  this, cacheEntry));
+            cacheEntry->AsyncDoom(nullptr);
             return NS_ERROR_UNEXPECTED; // XXX error code
         }
     }
 
     // Keep the conditions below in sync with the conditions in ReadFromCache.
 
     rv = NS_OK;