ack! back these out, weren't meant to land

This commit is contained in:
alecf%netscape.com 2001-11-27 23:53:18 +00:00
Родитель 9cdc5ef58a
Коммит c9c063213a
3 изменённых файлов: 4 добавлений и 32 удалений

Просмотреть файл

@ -156,13 +156,9 @@ protected:
FindBucket(size_t aSize);
public:
nsFixedSizeAllocator() : mBuckets(nsnull)
{
MOZ_COUNT_CTOR(nsFixedSizeAllocator);
}
nsFixedSizeAllocator() : mBuckets(nsnull) {}
~nsFixedSizeAllocator() {
MOZ_COUNT_DTOR(nsFixedSizeAllocator);
if (mBuckets)
PL_FinishArenaPool(&mPool);
}

Просмотреть файл

@ -37,7 +37,6 @@
#include "nsReadableUtils.h"
#include "nsIObjectInputStream.h"
#include "nsIObjectOutputStream.h"
#include "plarena.h"
////////////////////////////////////////////////////////////////////////////////
// These functions really should be part of nspr, and have internal knowledge
@ -165,10 +164,6 @@ static void PR_CALLBACK _hashFreeTable(void *pool, void *item) {
}
static PLHashEntry * PR_CALLBACK _hashAllocEntry(void *pool, const void *key) {
if (pool) {
return (PLHashEntry*)((nsFixedSizeAllocator*)pool)->Alloc(sizeof(PLHashEntry));
}
return PR_NEW(PLHashEntry);
}
@ -177,11 +172,7 @@ static void PR_CALLBACK _hashFreeEntry(void *pool, PLHashEntry *entry,
{
if (flag == HT_FREE_ENTRY) {
delete (nsHashKey *) (entry->key);
if (pool) {
((nsFixedSizeAllocator*)pool)->Free((void*)entry, sizeof(PLHashEntry));
}
else
PR_DELETE(entry);
PR_DELETE(entry);
}
}
@ -229,22 +220,13 @@ nsHashtable::nsHashtable(PRUint32 aInitSize, PRBool threadSafe)
: mLock(NULL), mEnumerating(PR_FALSE)
{
MOZ_COUNT_CTOR(nsHashtable);
static const size_t kBucketSizes[] =
{ sizeof(PLHashEntry) };
static const PRInt32 kNumBucketSizes =
sizeof(kBucketSizes) / sizeof(size_t);
mPool.Init("hashFoo", kBucketSizes, kNumBucketSizes,
sizeof(PLHashEntry)*aInitSize);
PRStatus status = PL_HashTableInit(&mHashtable,
aInitSize,
_hashValue,
_hashKeyCompare,
_hashValueCompare,
&_hashAllocOps,
(void*)&mPool);
NULL);
PR_ASSERT(status == PR_SUCCESS);
if (threadSafe) {
mLock = PR_NewLock();

Просмотреть файл

@ -49,13 +49,7 @@ class nsStringKey;
class NS_COM nsHashKey {
protected:
nsHashKey(void) {
#ifdef DEBUG
mKeyType = UnknownKey;
#endif
MOZ_COUNT_CTOR(nsHashKey);
}
nsHashKey(void);
public:
virtual ~nsHashKey(void);