diff --git a/configure.in b/configure.in index 70b45e780e56..db5ef623d2dc 100644 --- a/configure.in +++ b/configure.in @@ -2593,19 +2593,6 @@ if test "$ac_cv_cpp_partial_specialization" = yes ; then AC_DEFINE(HAVE_CPP_PARTIAL_SPECIALIZATION) fi -dnl Some compilers support extern declarations of explicit template instantiations. -AC_CACHE_CHECK(for extern explicit template instantiation, - ac_cv_cpp_extern_instantiation, - [AC_TRY_COMPILE(template class Foo{ T a; }; - extern template class Foo;, - , - ac_cv_cpp_extern_instantiation=yes, - ac_cv_cpp_extern_instantiation=no)]) -if test "$ac_cv_cpp_extern_instantiation" = yes ; then - AC_DEFINE(HAVE_CPP_EXTERN_INSTANTIATION) -fi - - dnl Some compilers have limited support for operators with templates; dnl specifically, it is necessary to define derived operators when a base dnl class's operator declaration should suffice. @@ -4260,7 +4247,7 @@ dnl ========================================================= dnl = Chrome format dnl ========================================================= MOZ_ARG_ENABLE_STRING(chrome-format, -[ --enable-chrome-format=FORMAT +[ --enable-chrome-format=jar|flat|both|symlink Select FORMAT of chrome files (default=jar)], MOZ_CHROME_FILE_FORMAT=`echo $enableval | tr A-Z a-z`) @@ -4270,8 +4257,9 @@ fi if test "$MOZ_CHROME_FILE_FORMAT" != "jar" && test "$MOZ_CHROME_FILE_FORMAT" != "flat" && + test "$MOZ_CHROME_FILE_FORMAT" != "symlink" && test "$MOZ_CHROME_FILE_FORMAT" != "both"; then - AC_MSG_ERROR([--enable-chrome-format must be set to either jar, flat or both]) + AC_MSG_ERROR([--enable-chrome-format must be set to either jar, flat, both, or symlink]) fi dnl ======================================================== diff --git a/xpcom/base/nscore.h b/xpcom/base/nscore.h index 065a45332754..57816e7d7fd9 100644 --- a/xpcom/base/nscore.h +++ b/xpcom/base/nscore.h @@ -208,7 +208,6 @@ typedef PRUint32 nsresult; #if defined(_MSC_VER) && (_MSC_VER>=1100) /* VC++ 5.0 and greater implement template specialization, 4.2 is unknown */ #define HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX - #define HAVE_CPP_EXTERN_INSTANTIATION #define HAVE_CPP_EXPLICIT #define HAVE_CPP_TYPENAME diff --git a/xpcom/ds/nsBaseHashtable.h b/xpcom/ds/nsBaseHashtable.h index aa6eddd1bd15..eaa6f159c801 100644 --- a/xpcom/ds/nsBaseHashtable.h +++ b/xpcom/ds/nsBaseHashtable.h @@ -104,7 +104,7 @@ public: * This function is especially useful for static hashtables. * @return PR_TRUE if the table has been initialized. */ - PRBool IsInitialized() const { return mTable.entrySize; } + PRBool IsInitialized() const { return this->mTable.entrySize; } /** * Return the number of entries in the table. @@ -186,7 +186,7 @@ public: "nsBaseHashtable was not initialized properly."); s_EnumReadArgs enumData = { enumFunc, userArg }; - return PL_DHashTableEnumerate(NS_CONST_CAST(PLDHashTable*, &mTable), + return PL_DHashTableEnumerate(NS_CONST_CAST(PLDHashTable*, &this->mTable), s_EnumReadStub, &enumData); } @@ -219,7 +219,7 @@ public: "nsBaseHashtable was not initialized properly."); s_EnumArgs enumData = { enumFunc, userArg }; - return PL_DHashTableEnumerate(&mTable, + return PL_DHashTableEnumerate(&this->mTable, s_EnumStub, &enumData); } @@ -230,10 +230,6 @@ public: void Clear() { nsTHashtable::Clear(); } protected: -#ifdef HAVE_CPP_AMBIGUITY_RESOLVING_USING - using nsTHashtable >::mTable; -#endif - /** * used internally during EnumerateRead. Allocated on the stack. * @param func the enumerator passed to EnumerateRead @@ -294,10 +290,6 @@ public: void Clear(); protected: -#ifdef HAVE_CPP_AMBIGUITY_RESOLVING_USING - using nsTHashtable::mTable; -#endif - PRLock* mLock; }; @@ -365,8 +357,8 @@ nsBaseHashtable::s_EnumStub template nsBaseHashtableMT::~nsBaseHashtableMT() { - if (mLock) - PR_DestroyLock(mLock); + if (this->mLock) + PR_DestroyLock(this->mLock); } template @@ -376,19 +368,19 @@ nsBaseHashtableMT::Init(PRUint32 initSize) if (!nsTHashtable::IsInitialized() && !nsTHashtable::Init(initSize)) return PR_FALSE; - mLock = PR_NewLock(); - NS_WARN_IF_FALSE(mLock, "Error creating lock during nsBaseHashtableL::Init()"); + this->mLock = PR_NewLock(); + NS_WARN_IF_FALSE(this->mLock, "Error creating lock during nsBaseHashtableL::Init()"); - return (mLock != nsnull); + return (this->mLock != nsnull); } template PRUint32 nsBaseHashtableMT::Count() const { - PR_Lock(mLock); + PR_Lock(this->mLock); PRUint32 count = nsTHashtable::Count(); - PR_Unlock(mLock); + PR_Unlock(this->mLock); return count; } @@ -398,10 +390,10 @@ PRBool nsBaseHashtableMT::Get(KeyType aKey, UserDataType* pData) const { - PR_Lock(mLock); + PR_Lock(this->mLock); PRBool res = nsBaseHashtable::Get(aKey, pData); - PR_Unlock(mLock); + PR_Unlock(this->mLock); return res; } @@ -411,10 +403,10 @@ PRBool nsBaseHashtableMT::Put(KeyType aKey, UserDataType aData) { - PR_Lock(mLock); + PR_Lock(this->mLock); PRBool res = nsBaseHashtable::Put(aKey, aData); - PR_Unlock(mLock); + PR_Unlock(this->mLock); return res; } @@ -423,9 +415,9 @@ template void nsBaseHashtableMT::Remove(KeyType aKey) { - PR_Lock(mLock); + PR_Lock(this->mLock); nsBaseHashtable::Remove(aKey); - PR_Unlock(mLock); + PR_Unlock(this->mLock); } template @@ -433,10 +425,10 @@ PRUint32 nsBaseHashtableMT::EnumerateRead (EnumReadFunction fEnumCall, void* userArg) const { - PR_Lock(mLock); + PR_Lock(this->mLock); PRUint32 count = nsBaseHashtable::EnumerateRead(fEnumCall, userArg); - PR_Unlock(mLock); + PR_Unlock(this->mLock); return count; } @@ -446,10 +438,10 @@ PRUint32 nsBaseHashtableMT::Enumerate (EnumFunction fEnumCall, void* userArg) { - PR_Lock(mLock); + PR_Lock(this->mLock); PRUint32 count = nsBaseHashtable::Enumerate(fEnumCall, userArg); - PR_Unlock(mLock); + PR_Unlock(this->mLock); return count; } @@ -458,9 +450,9 @@ template void nsBaseHashtableMT::Clear() { - PR_Lock(mLock); + PR_Lock(this->mLock); nsBaseHashtable::Clear(); - PR_Unlock(mLock); + PR_Unlock(this->mLock); } #endif // nsBaseHashtable_h__ diff --git a/xpcom/ds/nsClassHashtable.h b/xpcom/ds/nsClassHashtable.h index 240f1582fe42..53ec165f83d2 100644 --- a/xpcom/ds/nsClassHashtable.h +++ b/xpcom/ds/nsClassHashtable.h @@ -86,11 +86,6 @@ public: * @param pData if the key doesn't exist, pData will be set to nsnull. */ PRBool Get(KeyType aKey, UserDataType* pData) const; - -protected: -#ifdef HAVE_CPP_AMBIGUITY_RESOLVING_USING - using nsBaseHashtableMT, T*>::mLock; -#endif }; @@ -117,7 +112,7 @@ nsClassHashtable::Get(KeyType aKey, T** retVal) const *retVal = nsnull; return PR_FALSE; -}; +} // @@ -128,7 +123,7 @@ template PRBool nsClassHashtableMT::Get(KeyType aKey, T** retVal) const { - PR_Lock(mLock); + PR_Lock(this->mLock); typename nsBaseHashtableMT,T*>::EntryType* ent = GetEntry(aKey); @@ -138,7 +133,7 @@ nsClassHashtableMT::Get(KeyType aKey, T** retVal) const if (retVal) *retVal = ent->mData; - PR_Unlock(mLock); + PR_Unlock(this->mLock); return PR_TRUE; } @@ -146,9 +141,9 @@ nsClassHashtableMT::Get(KeyType aKey, T** retVal) const if (retVal) *retVal = nsnull; - PR_Unlock(mLock); + PR_Unlock(this->mLock); return PR_FALSE; -}; +} #endif // nsClassHashtable_h__ diff --git a/xpcom/ds/nsInterfaceHashtable.h b/xpcom/ds/nsInterfaceHashtable.h index 92f13873cc0d..a526febbddde 100644 --- a/xpcom/ds/nsInterfaceHashtable.h +++ b/xpcom/ds/nsInterfaceHashtable.h @@ -86,11 +86,6 @@ public: * If the key doesn't exist, pData will be set to nsnull. */ PRBool Get(KeyType aKey, UserDataType* pData) const; - -protected: -#ifdef HAVE_CPP_AMBIGUITY_RESOLVING_USING - using nsBaseHashtableMT, Interface*>::mLock; -#endif }; @@ -136,7 +131,7 @@ PRBool nsInterfaceHashtableMT::Get (KeyType aKey, UserDataType* pInterface) const { - PR_Lock(mLock); + PR_Lock(this->mLock); typename nsBaseHashtableMT, Interface*>::EntryType* ent = GetEntry(aKey); @@ -150,7 +145,7 @@ nsInterfaceHashtableMT::Get NS_IF_ADDREF(*pInterface); } - PR_Unlock(mLock); + PR_Unlock(this->mLock); return PR_TRUE; } @@ -160,7 +155,7 @@ nsInterfaceHashtableMT::Get if (pInterface) *pInterface = nsnull; - PR_Unlock(mLock); + PR_Unlock(this->mLock); return PR_FALSE; }