mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-19 07:26:26 +00:00
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:
parent
3341033724
commit
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...
|
// open input stream for reading...
|
||||||
nsCOMPtr<nsIInputStream> stream;
|
nsCOMPtr<nsIInputStream> stream;
|
||||||
rv = mCacheEntry->OpenInputStream(0, getter_AddRefs(stream));
|
rv = mCacheEntry->OpenInputStream(0, getter_AddRefs(stream));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user