зеркало из https://github.com/mozilla/gecko-dev.git
Bug 381657. Install offline cache listener even for loads from the disk/memory caches. patch by Dave Camp, r+sr=biesi
This commit is contained in:
Родитель
3341033724
Коммит
83d1634cc5
|
@ -1803,6 +1803,27 @@ nsHttpChannel::ReadFromCache()
|
|||
}
|
||||
}
|
||||
|
||||
// set up the offline cache entry for writing
|
||||
if (mCacheForOfflineUse) {
|
||||
PRBool shouldUpdateOffline;
|
||||
rv = ShouldUpdateOfflineCacheEntry(&shouldUpdateOffline);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (shouldUpdateOffline) {
|
||||
LOG(("writing to the offline cache"));
|
||||
rv = InitOfflineCacheEntry();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (mOfflineCacheEntry) {
|
||||
rv = InstallOfflineCacheListener();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
} else {
|
||||
LOG(("offline cache is up to date, not updating"));
|
||||
CloseOfflineCacheEntry();
|
||||
}
|
||||
}
|
||||
|
||||
// open input stream for reading...
|
||||
nsCOMPtr<nsIInputStream> stream;
|
||||
rv = mCacheEntry->OpenInputStream(0, getter_AddRefs(stream));
|
||||
|
|
Загрузка…
Ссылка в новой задаче