Bug 1413622 - Del with zero during logging. r=mayhemer

--HG--
extra : rebase_source : ed7491b82f2d8f5c907ba3981c0f815218e4ecfd
This commit is contained in:
Dragana Damjanovic dd.mozilla@gmail.com 2017-11-02 02:31:00 -04:00
Родитель eb54ec6bb0
Коммит 18247b50e7
1 изменённых файлов: 5 добавлений и 2 удалений

7
netwerk/cache/nsCacheService.cpp поставляемый
Просмотреть файл

@ -3064,8 +3064,11 @@ void nsCacheService::GetAppCacheDirectory(nsIFile ** result)
void
nsCacheService::LogCacheStatistics()
{
uint32_t hitPercentage = (uint32_t)((((double)mCacheHits) /
((double)(mCacheHits + mCacheMisses))) * 100);
uint32_t hitPercentage = 0;
if (!mCacheHits || !mCacheMisses) {
hitPercentage = (uint32_t)((((double)mCacheHits) /
((double)(mCacheHits + mCacheMisses))) * 100);
}
CACHE_LOG_INFO(("\nCache Service Statistics:\n\n"));
CACHE_LOG_INFO((" TotalEntries = %d\n", mTotalEntries));
CACHE_LOG_INFO((" Cache Hits = %d\n", mCacheHits));