mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1102172 - Fix possible appache update hang. r=jduell
This commit is contained in:
parent
60728bc65c
commit
2b58942723
@ -3266,7 +3266,9 @@ nsHttpChannel::OnCacheEntryAvailable(nsICacheEntry *entry,
|
||||
nsresult rv;
|
||||
|
||||
LOG(("nsHttpChannel::OnCacheEntryAvailable [this=%p entry=%p "
|
||||
"new=%d appcache=%p status=%x]\n", this, entry, aNew, aAppCache, status));
|
||||
"new=%d appcache=%p status=%x mAppCache=%p mAppCacheForWrite=%p]\n",
|
||||
this, entry, aNew, aAppCache, status,
|
||||
mApplicationCache.get(), mApplicationCacheForWrite.get()));
|
||||
|
||||
// if the channel's already fired onStopRequest, then we should ignore
|
||||
// this event.
|
||||
@ -3376,10 +3378,11 @@ nsHttpChannel::OnOfflineCacheEntryAvailable(nsICacheEntry *aEntry,
|
||||
|
||||
nsresult rv;
|
||||
|
||||
if (!mApplicationCache)
|
||||
mApplicationCache = aAppCache;
|
||||
|
||||
if (NS_SUCCEEDED(aEntryStatus)) {
|
||||
if (!mApplicationCache) {
|
||||
mApplicationCache = aAppCache;
|
||||
}
|
||||
|
||||
// We successfully opened an offline cache session and the entry,
|
||||
// so indicate we will load from the offline cache.
|
||||
mLoadedFromApplicationCache = true;
|
||||
@ -3396,6 +3399,10 @@ nsHttpChannel::OnOfflineCacheEntryAvailable(nsICacheEntry *aEntry,
|
||||
}
|
||||
|
||||
if (!mApplicationCacheForWrite && !mFallbackChannel) {
|
||||
if (!mApplicationCache) {
|
||||
mApplicationCache = aAppCache;
|
||||
}
|
||||
|
||||
// Check for namespace match.
|
||||
nsCOMPtr<nsIApplicationCacheNamespace> namespaceEntry;
|
||||
rv = mApplicationCache->GetMatchingNamespace(mSpec,
|
||||
|
Loading…
Reference in New Issue
Block a user