Bug 788365: Do not require securityInfo for AppCache entries, r=honzab
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -3344,18 +3344,21 @@ HttpCacheQuery::OpenCacheInputStream(boo
nsresult rv = mCacheEntry->GetSecurityInfo(
getter_AddRefs(mCachedSecurityInfo));
if (NS_FAILED(rv)) {
LOG(("failed to parse security-info [channel=%p, entry=%p]",
this, mCacheEntry.get()));
NS_WARNING("failed to parse security-info");
return rv;
}
- MOZ_ASSERT(mCachedSecurityInfo);
- if (!mCachedSecurityInfo) {
+
+ // 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.
+ MOZ_ASSERT(mCachedSecurityInfo || mLoadedFromApplicationCache);
+ if (!mCachedSecurityInfo && !mLoadedFromApplicationCache) {
LOG(("mCacheEntry->GetSecurityInfo returned success but did not "
"return the security info [channel=%p, entry=%p]",
this, mCacheEntry.get()));
return NS_ERROR_UNEXPECTED; // XXX error code
}
}
nsresult rv = NS_OK;