зеркало из https://github.com/mozilla/gecko-dev.git
bug 780750 - HTTP cache never gets used/fixed if wrong permissions on CACHE_MAP file. r=hurley
This commit is contained in:
Родитель
71cc2053ee
Коммит
056b8973b8
|
@ -989,11 +989,13 @@ nsDiskCacheDevice::OpenDiskCache()
|
|||
nsDiskCache::CorruptCacheInfo corruptInfo;
|
||||
rv = mCacheMap.Open(mCacheDirectory, &corruptInfo);
|
||||
|
||||
// move "corrupt" caches to trash
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
Telemetry::Accumulate(Telemetry::DISK_CACHE_CORRUPT_DETAILS,
|
||||
corruptInfo);
|
||||
} else if (rv == NS_ERROR_FILE_CORRUPTED) {
|
||||
} else if (rv == NS_ERROR_ALREADY_INITIALIZED) {
|
||||
NS_WARNING("nsDiskCacheDevice::OpenDiskCache: already open!");
|
||||
} else {
|
||||
// Consider cache corrupt: delete it
|
||||
Telemetry::Accumulate(Telemetry::DISK_CACHE_CORRUPT_DETAILS,
|
||||
corruptInfo);
|
||||
// delay delete by 1 minute to avoid IO thrash at startup
|
||||
|
@ -1001,10 +1003,6 @@ nsDiskCacheDevice::OpenDiskCache()
|
|||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
exists = false;
|
||||
} else {
|
||||
// don't gather telemetry for "corrupt cache" for new profile
|
||||
// where cache doesn't exist (most likely case if we're here).
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче