mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
bug 780750 - HTTP cache never gets used/fixed if wrong permissions on CACHE_MAP file. r=hurley
This commit is contained in:
parent
71cc2053ee
commit
056b8973b8
10
netwerk/cache/nsDiskCacheDevice.cpp
vendored
10
netwerk/cache/nsDiskCacheDevice.cpp
vendored
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user