[Pale-Moon] Issue #1854 - Account for users disabling off-line and memory caching.

Resolves #1854
This commit is contained in:
Moonchild 2020-12-19 21:56:53 +00:00 • committed by roytam1
commit 48f962a66f
2 changed files with 45 additions and 24 deletions

View file

@ -5893,7 +5893,12 @@ var OfflineApps = {
var cacheService = Cc["@mozilla.org/network/application-cache-service;1"]
.getService(Ci.nsIApplicationCacheService);
if (!groups) {
groups = cacheService.getGroups();
try {
groups = cacheService.getGroups();
} catch(ex) {
// Cache disabled.
return 0;
}
}
var usage = 0;