Bug 1650613 - Fix about:cache appcache listing, let AppCacheStorage be visited with null load context info, r=michal,necko-reviewers

Depends on D81885

Differential Revision: https://phabricator.services.mozilla.com/D82542
This commit is contained in:
Honza Bambas 2020-07-10 11:21:14 +00:00
parent e4fc2ab91f
commit 2b6e822019
2 changed files with 1 additions and 4 deletions

View File

@ -159,9 +159,6 @@ NS_IMETHODIMP AppCacheStorage::AsyncVisitStorage(
if (!CacheStorageService::Self()) {
return NS_ERROR_NOT_INITIALIZED;
}
if (!LoadInfo()) {
return NS_ERROR_CACHE_KEY_NOT_FOUND;
}
LOG(("AppCacheStorage::AsyncVisitStorage [this=%p, cb=%p]", this, aVisitor));

View File

@ -156,7 +156,7 @@ NS_IMETHODIMP _OldVisitCallbackWrapper::VisitDevice(
nsCacheService::GetAppCacheDirectory(getter_AddRefs(dir));
}
if (mLoadInfo->IsAnonymous()) {
if (mLoadInfo && mLoadInfo->IsAnonymous()) {
// Anonymous visiting reports 0, 0 since we cannot count that
// early the number of anon entries.
mCB->OnCacheStorageInfo(0, 0, capacity, dir);