Fix bug 92348, browser won't start if cache capacities set to 0. Added

check to fail nsCacheService::ActivateEntry() if neither disk or memory
cache devices are enabled, or if the memory cache device is not enabled
and the request if for a non-stream-based entry. r=gagan, sr=dougt.

Also changing pref name for cache parent directory according to suggestion
in bug 78480.  r=gagan, sr=darin.
This commit is contained in:
gordon%netscape.com 2001-09-20 01:12:35 +00:00
Родитель db73aa75c8
Коммит bf5d6a446a
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -53,7 +53,7 @@
#endif
#define DISK_CACHE_ENABLE_PREF "browser.cache.disk.enable"
#define DISK_CACHE_DIR_PREF "browser.cache.disk.directory"
#define DISK_CACHE_DIR_PREF "browser.cache.disk.parent_directory"
#define DISK_CACHE_CAPACITY_PREF "browser.cache.disk.capacity"
#define MEMORY_CACHE_ENABLE_PREF "browser.cache.memory.enable"
@ -815,6 +815,9 @@ nsCacheService::ActivateEntry(nsCacheRequest * request,
if (result) *result = nsnull;
if ((!request) || (!result)) return NS_ERROR_NULL_POINTER;
if (!mEnableMemoryDevice && (!mEnableDiskDevice || !request->IsStreamBased() ))
return NS_ERROR_FAILURE;
// search active entries (including those not bound to device)
nsCacheEntry *entry = mActiveEntries.GetEntry(request->mKey);