mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Backed out changeset ddc9d5258911 due to a=bustage
This commit is contained in:
parent
0476e7c099
commit
6d6ae758ad
19
netwerk/cache/nsCacheService.cpp
vendored
19
netwerk/cache/nsCacheService.cpp
vendored
@ -76,6 +76,10 @@
|
||||
|
||||
#include "mozilla/FunctionTimer.h"
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
#include "mozilla/net/NeckoCommon.h"
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* nsCacheProfilePrefObserver
|
||||
*****************************************************************************/
|
||||
@ -789,6 +793,14 @@ nsCacheService::DispatchToCacheIOThread(nsIRunnable* event)
|
||||
PRBool
|
||||
nsCacheProfilePrefObserver::DiskCacheEnabled()
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
// Bad Things (tm) are likely to happen if child and parent both write to
|
||||
// disk cache.
|
||||
// - TODO: remove once we turn off caching entirely in child (bug 559714)
|
||||
if (mozilla::net::IsNeckoChild())
|
||||
return PR_FALSE;
|
||||
#endif
|
||||
|
||||
if ((mDiskCacheCapacity == 0) || (!mDiskCacheParentDirectory)) return PR_FALSE;
|
||||
return mDiskCacheEnabled;
|
||||
}
|
||||
@ -846,6 +858,13 @@ nsCacheProfilePrefObserver::MemoryCacheEnabled()
|
||||
PRInt32
|
||||
nsCacheProfilePrefObserver::MemoryCacheCapacity()
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
// For now use small memory cache (1 MB) on child, just for FTP/wyciwyg
|
||||
// - TODO: remove once we turn off caching entirely in child (bug 559714)
|
||||
if (mozilla::net::IsNeckoChild())
|
||||
return 1024;
|
||||
#endif
|
||||
|
||||
PRInt32 capacity = mMemoryCacheCapacity;
|
||||
if (capacity >= 0) {
|
||||
CACHE_LOG_DEBUG(("Memory cache capacity forced to %d\n", capacity));
|
||||
|
Loading…
Reference in New Issue
Block a user