diff --git a/mozilla/xpcom/glue/nsBaseHashtable.h b/mozilla/xpcom/glue/nsBaseHashtable.h index db5bb32b0d5..7a1fa73e7c1 100644 --- a/mozilla/xpcom/glue/nsBaseHashtable.h +++ b/mozilla/xpcom/glue/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