зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1102172 - Fix possible appache update hang. r=jduell
This commit is contained in:
Родитель
51dc9deec5
Коммит
2a3843999d
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче