Bug 619685 unused variable dataSize in nsDiskCacheStreamIO::FlushBufferToFile
authortimeless@mozdev.org
Wed, 06 Apr 2011 11:14:10 -0700
changeset 67580 09f0f34dcd8a8efff487ec48a77ee5774ed002e9
parent 67579 70cedf3a3327ce6cbb671a061dad6d94b2723b4e
child 67581 06126c87665912448577a17d3ec1daa0c0f46c3c
push idunknown
push userunknown
push dateunknown
bugs619685
milestone2.2a1pre
Bug 619685 unused variable dataSize in nsDiskCacheStreamIO::FlushBufferToFile r=jduell
netwerk/cache/nsDiskCacheStreams.cpp
--- a/netwerk/cache/nsDiskCacheStreams.cpp
+++ b/netwerk/cache/nsDiskCacheStreams.cpp
@@ -752,19 +752,19 @@ nsDiskCacheStreamIO::FlushBufferToFile()
             if (NS_FAILED(rv))  return rv;
         }
         record->SetDataFileGeneration(mBinding->mGeneration);
         
         // allocate file
         rv = OpenCacheFile(PR_RDWR | PR_CREATE_FILE, &mFD);
         if (NS_FAILED(rv))  return rv;
 
+#if 0
         PRInt64 dataSize = mBinding->mCacheEntry->PredictedDataSize();
 // Appears to cause bug 617123?  Disabled for now.
-#if 0
         if (dataSize != -1)
             mozilla::fallocate(mFD, PR_MIN(dataSize, kPreallocateLimit));
 #endif
     }
     
     // write buffer
     PRInt32 bytesWritten = PR_Write(mFD, mBuffer, mBufEnd);
     if (PRUint32(bytesWritten) != mBufEnd) {