Bug 559714 - bustage fix. a=fennec-2.0b2
authorJason Duell <jduell.mcbugs@gmail.com>
Thu, 28 Oct 2010 03:44:48 -0700
changeset 56641 b67099fcd4d84337928db2f2f7d219591733c044
parent 56640 eefdc0e5e208c17553f7e2fb428a79ac40fabc62
child 56642 882525a981190253d2f010b3266138fddab294fb
push idunknown
push userunknown
push dateunknown
reviewersfennec-2
bugs559714
milestone2.0b8pre
first release with
nightly win64
b67099fcd4d8 / 4.0b8pre / 20101028055046 / files
nightly linux32
nightly linux64
nightly mac
nightly win32
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly win64
Bug 559714 - bustage fix. a=fennec-2.0b2
netwerk/cache/nsCacheService.cpp
--- a/netwerk/cache/nsCacheService.cpp
+++ b/netwerk/cache/nsCacheService.cpp
@@ -788,24 +788,16 @@ nsCacheService::DispatchToCacheIOThread(
     if (!gService->mCacheIOThread) return NS_ERROR_NOT_AVAILABLE;
     return gService->mCacheIOThread->Dispatch(event, NS_DISPATCH_NORMAL);
 }
 
 
 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;
 }
 
 
 PRBool
 nsCacheProfilePrefObserver::OfflineCacheEnabled()
 {
@@ -853,23 +845,16 @@ nsCacheProfilePrefObserver::MemoryCacheE
  *  x = log2(K) - 14
  *  C = x^2/3 + x + 2/3 + 0.1 (0.1 for rounding)
  *  if (C > 32) C = 32
  */
 
 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));
         return capacity;
     }
 
     static PRUint64 bytes = PR_GetPhysicalMemorySize();
     CACHE_LOG_DEBUG(("Physical Memory size is %llu\n", bytes));