From 04eda085a6d48d6cde18a82eb189e9a76452cd92 Mon Sep 17 00:00:00 2001 From: "bsmedberg%covad.net" Date: Mon, 26 May 2003 23:36:19 +0000 Subject: [PATCH] bug 206254 allow nsBaseHashtable::IsInitialized() and bug 206528 nsBaseHashtable should initialize mLock. r=alecf git-svn-id: svn://10.0.0.236/trunk@142935 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/ds/nsBaseHashtable.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mozilla/xpcom/ds/nsBaseHashtable.h b/mozilla/xpcom/ds/nsBaseHashtable.h index db5bb32b0d5..7a1fa73e7c1 100644 --- a/mozilla/xpcom/ds/nsBaseHashtable.h +++ b/mozilla/xpcom/ds/nsBaseHashtable.h @@ -108,6 +108,13 @@ public: PRBool Init(PRUint32 initSize = PL_DHASH_MIN_SIZE, PRBool threadSafe = PR_FALSE); + /** + * Check whether the table has been initialized. + * This function is especially useful for static hashtables. + * @return PR_TRUE if the table has been initialized. + */ + PRBool IsInitialized() const { return mTable.entrySize; } + /** * retrieve the value for a key. * @param aKey the key to retreive @@ -246,6 +253,7 @@ nsBaseHashtableET::~nsBaseHashtableET() template nsBaseHashtable::nsBaseHashtable() + : mLock(nsnull) { } template