+ Added cast to help Mac compile

+ Fixed problem in which download-time was not being computed (#8305)
This commit is contained in:
fur%netscape.com 1999-12-07 04:54:05 +00:00
Родитель 1a5893f09f
Коммит f084d505e3
1 изменённых файлов: 4 добавлений и 3 удалений

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

@ -38,7 +38,7 @@
#define MAX_DISK_CACHE_ENTRIES 3200 #define MAX_DISK_CACHE_ENTRIES 3200
// Cache capacities in MB, overridable via APIs // Cache capacities in MB, overridable via APIs
#define DEFAULT_MEMORY_CACHE_CAPACITY 2000 #define DEFAULT_MEMORY_CACHE_CAPACITY 100
#define DEFAULT_DISK_CACHE_CAPACITY 10000 #define DEFAULT_DISK_CACHE_CAPACITY 10000
#define CACHE_HIGH_WATER_MARK(capacity) ((PRUint32)(0.98 * (capacity))) #define CACHE_HIGH_WATER_MARK(capacity) ((PRUint32)(0.98 * (capacity)))
@ -162,7 +162,8 @@ nsCacheManager::GetCachedNetData(const char *aUriSpec, const char *aSecondaryKey
if (mDiskCacheCapacity == (PRUint32)-1) if (mDiskCacheCapacity == (PRUint32)-1)
return NS_ERROR_NOT_AVAILABLE; return NS_ERROR_NOT_AVAILABLE;
} else if ((aFlags & BYPASS_PERSISTENT_CACHE) || !mDiskCacheCapacity) { } else if ((aFlags & BYPASS_PERSISTENT_CACHE) ||
(!mFileCache && !mFlatCache) || !mDiskCacheCapacity) {
cache = mMemCache; cache = mMemCache;
spaceManager = mMemSpaceManager; spaceManager = mMemSpaceManager;
} else { } else {
@ -218,7 +219,7 @@ nsCacheManager::NoteDormant(nsCachedNetData* aEntry)
nsStringKey hashTableKey(nsCString(key, keyLength)); nsStringKey hashTableKey(nsCString(key, keyLength));
deletedEntry = (nsCachedNetData*)gCacheManager->mActiveCacheRecords->Remove(&hashTableKey); deletedEntry = (nsCachedNetData*)gCacheManager->mActiveCacheRecords->Remove(&hashTableKey);
NS_ASSERTION(deletedEntry == aEntry, "Hash table inconsistency"); // NS_ASSERTION(deletedEntry == aEntry, "Hash table inconsistency");
return NS_OK; return NS_OK;
} }