зеркало из https://github.com/mozilla/gecko-dev.git
Bug 815639 - mLocalFile in nsDiskCacheStream doesn't have to be in the class
This commit is contained in:
Родитель
277a560f9c
Коммит
c138c1ea53
|
@ -678,18 +678,16 @@ nsDiskCacheStreamIO::OpenCacheFile(int flags, PRFileDesc ** fd)
|
|||
|
||||
nsresult rv;
|
||||
nsDiskCacheMap * cacheMap = mDevice->CacheMap();
|
||||
nsCOMPtr<nsIFile> localFile;
|
||||
|
||||
rv = cacheMap->GetLocalFileForDiskCacheRecord(&mBinding->mRecord,
|
||||
nsDiskCache::kData,
|
||||
!!(flags & PR_CREATE_FILE),
|
||||
getter_AddRefs(mLocalFile));
|
||||
getter_AddRefs(localFile));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
// create PRFileDesc for input stream - the 00600 is just for consistency
|
||||
rv = mLocalFile->OpenNSPRFileDesc(flags, 00600, fd);
|
||||
if (NS_FAILED(rv)) return rv; // unable to open file
|
||||
|
||||
return NS_OK;
|
||||
return localFile->OpenNSPRFileDesc(flags, 00600, fd);
|
||||
}
|
||||
|
||||
|
||||
|
@ -784,7 +782,6 @@ nsDiskCacheStreamIO::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf)
|
|||
{
|
||||
size_t usage = aMallocSizeOf(this);
|
||||
|
||||
usage += aMallocSizeOf(mLocalFile);
|
||||
usage += aMallocSizeOf(mFD);
|
||||
usage += aMallocSizeOf(mBuffer);
|
||||
|
||||
|
|
|
@ -70,7 +70,6 @@ private:
|
|||
nsDiskCacheDevice * mDevice;
|
||||
nsDiskCacheOutputStream * mOutStream; // not an owning reference
|
||||
int32_t mInStreamCount;
|
||||
nsCOMPtr<nsIFile> mLocalFile;
|
||||
PRFileDesc * mFD;
|
||||
|
||||
uint32_t mStreamPos; // for Output Streams
|
||||
|
|
Загрузка…
Ссылка в новой задаче