зеркало из https://github.com/mozilla/gecko-dev.git
fixes bug 234608 "Removal of some deadcode in nsDiskCacheBinding" patch by alfredkayser@nl.ibm.com r=biesi sr=darin
This commit is contained in:
Родитель
5482e3d962
Коммит
e672e7f3a6
|
@ -266,30 +266,6 @@ nsDiskCacheBindery::FindActiveBinding(PRUint32 hashNumber)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* FindBinding : to identify whether a record is 'in use' so we don't evict it
|
||||
*/
|
||||
nsDiskCacheBinding *
|
||||
nsDiskCacheBindery::FindBinding(nsDiskCacheRecord * record)
|
||||
{
|
||||
NS_ASSERTION(initialized, "nsDiskCacheBindery not initialized");
|
||||
// find hash entry for key
|
||||
HashTableEntry * hashEntry;
|
||||
hashEntry = (HashTableEntry *) PL_DHashTableOperate(&table, (void*) record->HashNumber(), PL_DHASH_LOOKUP);
|
||||
if (PL_DHASH_ENTRY_IS_FREE(hashEntry)) return nsnull;
|
||||
|
||||
// walk list looking for matching record (match on MetaLocation)
|
||||
NS_ASSERTION(hashEntry->mBinding, "hash entry left with no binding");
|
||||
nsDiskCacheBinding * binding = hashEntry->mBinding;
|
||||
while (binding->mRecord.MetaLocation() != record->MetaLocation()) {
|
||||
binding = (nsDiskCacheBinding *)PR_NEXT_LINK(binding);
|
||||
if (binding == hashEntry->mBinding) return nsnull;
|
||||
}
|
||||
return binding;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* AddBinding
|
||||
*
|
||||
|
|
|
@ -125,17 +125,15 @@ public:
|
|||
nsresult Init();
|
||||
void Reset();
|
||||
|
||||
nsDiskCacheBinding * CreateBinding(nsCacheEntry * entry,
|
||||
nsDiskCacheRecord * record);
|
||||
nsDiskCacheBinding * CreateBinding(nsCacheEntry * entry,
|
||||
nsDiskCacheRecord * record);
|
||||
|
||||
nsDiskCacheBinding * FindActiveBinding(PRUint32 hashNumber);
|
||||
nsDiskCacheBinding * FindBinding(nsDiskCacheRecord * record);
|
||||
nsresult AddBinding(nsDiskCacheBinding * binding);
|
||||
void RemoveBinding(nsDiskCacheBinding * binding);
|
||||
PRBool ActiveBindings();
|
||||
|
||||
|
||||
private:
|
||||
nsresult AddBinding(nsDiskCacheBinding * binding);
|
||||
|
||||
// member variables
|
||||
static PLDHashTableOps ops;
|
||||
|
|
Загрузка…
Ссылка в новой задаче