Bug 77209. Get rid of unused module instance counting in order to eliminate duplicate global symbols. r=erik, sr=shaver
This commit is contained in:
Родитель
4d40563ed6
Коммит
91f3c0c4ec
|
@ -44,10 +44,6 @@ static NS_DEFINE_CID(kJAClassicStringDetectorCID, NS_JA_CLASSIC_STRING_DETECTO
|
||||||
static NS_DEFINE_CID(kKOClassicDetectorCID, NS_KO_CLASSIC_DETECTOR_CID);
|
static NS_DEFINE_CID(kKOClassicDetectorCID, NS_KO_CLASSIC_DETECTOR_CID);
|
||||||
static NS_DEFINE_CID(kKOClassicStringDetectorCID, NS_KO_CLASSIC_STRING_DETECTOR_CID);
|
static NS_DEFINE_CID(kKOClassicStringDetectorCID, NS_KO_CLASSIC_STRING_DETECTOR_CID);
|
||||||
|
|
||||||
PRInt32 g_InstanceCount = 0;
|
|
||||||
PRInt32 g_LockCount = 0;
|
|
||||||
|
|
||||||
|
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsJACharsetClassicDetector);
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsJACharsetClassicDetector);
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsJAStringCharsetClassicDetector);
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsJAStringCharsetClassicDetector);
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsKOCharsetClassicDetector);
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsKOCharsetClassicDetector);
|
||||||
|
|
|
@ -25,7 +25,4 @@
|
||||||
|
|
||||||
#include "prtypes.h"
|
#include "prtypes.h"
|
||||||
|
|
||||||
extern "C" PRInt32 g_InstanceCount;
|
|
||||||
extern "C" PRInt32 g_LockCount;
|
|
||||||
|
|
||||||
#endif /* nsClassicCharDetDll_h__ */
|
#endif /* nsClassicCharDetDll_h__ */
|
||||||
|
|
|
@ -205,12 +205,10 @@ nsClassicDetector::nsClassicDetector(const char* language)
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
mObserver = nsnull;
|
mObserver = nsnull;
|
||||||
PL_strcpy(mLanguage, language);
|
PL_strcpy(mLanguage, language);
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
nsClassicDetector::~nsClassicDetector()
|
nsClassicDetector::~nsClassicDetector()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
NS_IMETHODIMP nsClassicDetector::Init(
|
NS_IMETHODIMP nsClassicDetector::Init(
|
||||||
|
@ -261,12 +259,10 @@ nsClassicStringDetector::nsClassicStringDetector(const char* language)
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PL_strcpy(mLanguage, language);
|
PL_strcpy(mLanguage, language);
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
nsClassicStringDetector::~nsClassicStringDetector()
|
nsClassicStringDetector::~nsClassicStringDetector()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
|
|
|
@ -30,10 +30,4 @@
|
||||||
#include "nsIStringCharsetDetector.h"
|
#include "nsIStringCharsetDetector.h"
|
||||||
#include "nsICharsetDetectionAdaptor.h"
|
#include "nsICharsetDetectionAdaptor.h"
|
||||||
|
|
||||||
#define g_InstanceCount nsCharDetModule_g_InstanceCount
|
|
||||||
#define g_LockCount nsCharDetModule_g_LockCount
|
|
||||||
|
|
||||||
extern "C" PRInt32 g_InstanceCount;
|
|
||||||
extern "C" PRInt32 g_LockCount;
|
|
||||||
|
|
||||||
#endif /* nsCharDetDll_h__ */
|
#endif /* nsCharDetDll_h__ */
|
||||||
|
|
|
@ -52,9 +52,6 @@
|
||||||
#include "nsCharsetDetectionAdaptorCID.h"
|
#include "nsCharsetDetectionAdaptorCID.h"
|
||||||
#include "nsDocumentCharsetInfoCID.h"
|
#include "nsDocumentCharsetInfoCID.h"
|
||||||
|
|
||||||
PRInt32 g_InstanceCount = 0;
|
|
||||||
PRInt32 g_LockCount = 0;
|
|
||||||
|
|
||||||
//#define INCLUDE_DBGDETECTOR
|
//#define INCLUDE_DBGDETECTOR
|
||||||
#ifdef INCLUDE_DBGDETECTOR
|
#ifdef INCLUDE_DBGDETECTOR
|
||||||
// for debuging only
|
// for debuging only
|
||||||
|
|
|
@ -94,14 +94,12 @@ nsCyrXPCOMDetector:: nsCyrXPCOMDetector(PRUint8 aItems,
|
||||||
: nsCyrillicDetector(aItems, aCyrillicClass, aCharsets)
|
: nsCyrillicDetector(aItems, aCyrillicClass, aCharsets)
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
mObserver = nsnull;
|
mObserver = nsnull;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
nsCyrXPCOMDetector::~nsCyrXPCOMDetector()
|
nsCyrXPCOMDetector::~nsCyrXPCOMDetector()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
@ -152,13 +150,11 @@ nsCyrXPCOMStringDetector:: nsCyrXPCOMStringDetector(PRUint8 aItems,
|
||||||
: nsCyrillicDetector(aItems, aCyrillicClass, aCharsets)
|
: nsCyrillicDetector(aItems, aCyrillicClass, aCharsets)
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
nsCyrXPCOMStringDetector::~nsCyrXPCOMStringDetector()
|
nsCyrXPCOMStringDetector::~nsCyrXPCOMStringDetector()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
|
|
@ -37,12 +37,10 @@ nsDebugDetector::nsDebugDetector( nsDebugDetectorSel aSel)
|
||||||
mObserver = nsnull;
|
mObserver = nsnull;
|
||||||
mStop = PR_FALSE;
|
mStop = PR_FALSE;
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
nsDebugDetector::~nsDebugDetector()
|
nsDebugDetector::~nsDebugDetector()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
NS_IMETHODIMP nsDebugDetector::Init(nsICharsetDetectionObserver* aObserver)
|
NS_IMETHODIMP nsDebugDetector::Init(nsICharsetDetectionObserver* aObserver)
|
||||||
|
|
|
@ -86,13 +86,11 @@ NS_IMPL_ISUPPORTS1 ( nsMyObserver ,nsICharsetDetectionObserver);
|
||||||
nsDetectionAdaptor::nsDetectionAdaptor( void )
|
nsDetectionAdaptor::nsDetectionAdaptor( void )
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(& g_InstanceCount);
|
|
||||||
mDontFeedToDetector = PR_TRUE;
|
mDontFeedToDetector = PR_TRUE;
|
||||||
}
|
}
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
nsDetectionAdaptor::~nsDetectionAdaptor()
|
nsDetectionAdaptor::~nsDetectionAdaptor()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(& g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
static NS_DEFINE_IID(kIParserFilterIID, NS_IPARSERFILTER_IID);
|
static NS_DEFINE_IID(kIParserFilterIID, NS_IPARSERFILTER_IID);
|
||||||
|
|
||||||
class CToken;
|
class CToken;
|
||||||
extern "C" PRInt32 g_InstanceCount;
|
|
||||||
extern "C" PRInt32 g_LockCount;
|
|
||||||
|
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
class nsMyObserver : public nsICharsetDetectionObserver
|
class nsMyObserver : public nsICharsetDetectionObserver
|
||||||
|
@ -43,7 +41,6 @@ class nsMyObserver : public nsICharsetDetectionObserver
|
||||||
nsMyObserver( void )
|
nsMyObserver( void )
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(& g_InstanceCount);
|
|
||||||
mWebShellSvc = nsnull;
|
mWebShellSvc = nsnull;
|
||||||
mNotifyByReload = PR_FALSE;
|
mNotifyByReload = PR_FALSE;
|
||||||
mWeakRefDocument = nsnull;
|
mWeakRefDocument = nsnull;
|
||||||
|
@ -51,7 +48,6 @@ class nsMyObserver : public nsICharsetDetectionObserver
|
||||||
}
|
}
|
||||||
virtual ~nsMyObserver( void )
|
virtual ~nsMyObserver( void )
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(& g_InstanceCount);
|
|
||||||
// do not release nor delete mWeakRefDocument
|
// do not release nor delete mWeakRefDocument
|
||||||
// do not release nor delete mWeakRefParser
|
// do not release nor delete mWeakRefParser
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,12 +36,10 @@ NS_IMPL_THREADSAFE_ISUPPORTS1(nsDocumentCharsetInfo, nsIDocumentCharsetInfo);
|
||||||
nsDocumentCharsetInfo::nsDocumentCharsetInfo()
|
nsDocumentCharsetInfo::nsDocumentCharsetInfo()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDocumentCharsetInfo::~nsDocumentCharsetInfo()
|
nsDocumentCharsetInfo::~nsDocumentCharsetInfo()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsDocumentCharsetInfo::SetForcedCharset(nsIAtom * aCharset)
|
NS_IMETHODIMP nsDocumentCharsetInfo::SetForcedCharset(nsIAtom * aCharset)
|
||||||
|
|
|
@ -43,7 +43,6 @@ nsMetaCharsetObserver::nsMetaCharsetObserver()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
bMetaCharsetObserverStarted = PR_FALSE;
|
bMetaCharsetObserverStarted = PR_FALSE;
|
||||||
PR_AtomicIncrement(& g_InstanceCount);
|
|
||||||
nsresult res;
|
nsresult res;
|
||||||
mAlias = nsnull;
|
mAlias = nsnull;
|
||||||
NS_WITH_SERVICE(nsICharsetAlias, calias, kCharsetAliasCID, &res);
|
NS_WITH_SERVICE(nsICharsetAlias, calias, kCharsetAliasCID, &res);
|
||||||
|
@ -55,7 +54,6 @@ nsMetaCharsetObserver::nsMetaCharsetObserver()
|
||||||
nsMetaCharsetObserver::~nsMetaCharsetObserver()
|
nsMetaCharsetObserver::~nsMetaCharsetObserver()
|
||||||
{
|
{
|
||||||
// should we release mAlias
|
// should we release mAlias
|
||||||
PR_AtomicDecrement(& g_InstanceCount);
|
|
||||||
if (bMetaCharsetObserverStarted == PR_TRUE) {
|
if (bMetaCharsetObserverStarted == PR_TRUE) {
|
||||||
// call to end the ObserverService
|
// call to end the ObserverService
|
||||||
End();
|
End();
|
||||||
|
|
|
@ -312,13 +312,11 @@ nsXPCOMDetector::nsXPCOMDetector(PRUint8 aItems, nsVerifier **aVer, nsEUCStatist
|
||||||
: nsPSMDetector( aItems, aVer, aStatisticsSet)
|
: nsPSMDetector( aItems, aVer, aStatisticsSet)
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
mObserver = nsnull;
|
mObserver = nsnull;
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
nsXPCOMDetector::~nsXPCOMDetector()
|
nsXPCOMDetector::~nsXPCOMDetector()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
NS_IMETHODIMP nsXPCOMDetector::Init(
|
NS_IMETHODIMP nsXPCOMDetector::Init(
|
||||||
|
@ -361,12 +359,10 @@ nsXPCOMStringDetector::nsXPCOMStringDetector(PRUint8 aItems, nsVerifier** aVer,
|
||||||
: nsPSMDetector( aItems, aVer, aStatisticsSet)
|
: nsPSMDetector( aItems, aVer, aStatisticsSet)
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
nsXPCOMStringDetector::~nsXPCOMStringDetector()
|
nsXPCOMStringDetector::~nsXPCOMStringDetector()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
void nsXPCOMStringDetector::Report(const char* charset)
|
void nsXPCOMStringDetector::Report(const char* charset)
|
||||||
|
|
|
@ -41,14 +41,11 @@ static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||||
nsXMLEncodingObserver::nsXMLEncodingObserver()
|
nsXMLEncodingObserver::nsXMLEncodingObserver()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(& g_InstanceCount);
|
|
||||||
bXMLEncodingObserverStarted = PR_FALSE;
|
bXMLEncodingObserverStarted = PR_FALSE;
|
||||||
}
|
}
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
nsXMLEncodingObserver::~nsXMLEncodingObserver()
|
nsXMLEncodingObserver::~nsXMLEncodingObserver()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(& g_InstanceCount);
|
|
||||||
|
|
||||||
// call to end the ObserverService
|
// call to end the ObserverService
|
||||||
if (bXMLEncodingObserverStarted == PR_TRUE) {
|
if (bXMLEncodingObserverStarted == PR_TRUE) {
|
||||||
End();
|
End();
|
||||||
|
|
|
@ -44,10 +44,6 @@ static NS_DEFINE_CID(kKONativeStringDetectorCID, NS_KO_NATIVE_STRING_DETECTOR_
|
||||||
static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID);
|
static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID);
|
||||||
static NS_DEFINE_IID(kFactoryIID, NS_IFACTORY_IID);
|
static NS_DEFINE_IID(kFactoryIID, NS_IFACTORY_IID);
|
||||||
|
|
||||||
PRInt32 g_InstanceCount = 0;
|
|
||||||
PRInt32 g_LockCount = 0;
|
|
||||||
|
|
||||||
|
|
||||||
extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* aServMgr,
|
extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* aServMgr,
|
||||||
const nsCID &aClass,
|
const nsCID &aClass,
|
||||||
const char *aClassName,
|
const char *aClassName,
|
||||||
|
@ -83,7 +79,7 @@ extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* aServMgr,
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" NS_EXPORT PRBool NSCanUnload(nsISupports* aServMgr) {
|
extern "C" NS_EXPORT PRBool NSCanUnload(nsISupports* aServMgr) {
|
||||||
return PRBool(g_InstanceCount == 0 && g_LockCount == 0);
|
return PR_FALSE;
|
||||||
}
|
}
|
||||||
extern "C" NS_EXPORT nsresult NSRegisterSelf(nsISupports* aServMgr, const char *path)
|
extern "C" NS_EXPORT nsresult NSRegisterSelf(nsISupports* aServMgr, const char *path)
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,7 +25,4 @@
|
||||||
|
|
||||||
#include "prtypes.h"
|
#include "prtypes.h"
|
||||||
|
|
||||||
extern "C" PRInt32 g_InstanceCount;
|
|
||||||
extern "C" PRInt32 g_LockCount;
|
|
||||||
|
|
||||||
#endif /* nsNativeCharDetDll_h__ */
|
#endif /* nsNativeCharDetDll_h__ */
|
||||||
|
|
|
@ -117,7 +117,6 @@ nsNativeDetector::nsNativeDetector(PRUint32 aCodePage)
|
||||||
mCodePage = aCodePage;
|
mCodePage = aCodePage;
|
||||||
mMultiLanguage = NULL;
|
mMultiLanguage = NULL;
|
||||||
mMLangConvertCharset = NULL;
|
mMLangConvertCharset = NULL;
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
nsNativeDetector::~nsNativeDetector()
|
nsNativeDetector::~nsNativeDetector()
|
||||||
|
@ -128,7 +127,6 @@ nsNativeDetector::~nsNativeDetector()
|
||||||
if (NULL != mMLangConvertCharset)
|
if (NULL != mMLangConvertCharset)
|
||||||
mMLangConvertCharset->Release();
|
mMLangConvertCharset->Release();
|
||||||
CoUninitialize();
|
CoUninitialize();
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
NS_IMETHODIMP nsNativeDetector::Init(
|
NS_IMETHODIMP nsNativeDetector::Init(
|
||||||
|
@ -208,7 +206,6 @@ nsNativeStringDetector::nsNativeStringDetector(PRUint32 aCodePage)
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
mCodePage = aCodePage;
|
mCodePage = aCodePage;
|
||||||
mMultiLanguage = NULL;
|
mMultiLanguage = NULL;
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
nsNativeStringDetector::~nsNativeStringDetector()
|
nsNativeStringDetector::~nsNativeStringDetector()
|
||||||
|
@ -216,7 +213,6 @@ nsNativeStringDetector::~nsNativeStringDetector()
|
||||||
if (NULL != mMultiLanguage)
|
if (NULL != mMultiLanguage)
|
||||||
mMultiLanguage->Release();
|
mMultiLanguage->Release();
|
||||||
CoUninitialize();
|
CoUninitialize();
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
|
@ -265,10 +261,8 @@ public:
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
mCodePage = aCodePage;
|
mCodePage = aCodePage;
|
||||||
mStringBase = stringBase;
|
mStringBase = stringBase;
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
virtual ~nsNativeDetectorFactory() {
|
virtual ~nsNativeDetectorFactory() {
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHOD CreateInstance(nsISupports* aDelegate, const nsIID& aIID, void** aResult);
|
NS_IMETHOD CreateInstance(nsISupports* aDelegate, const nsIID& aIID, void** aResult);
|
||||||
|
@ -309,10 +303,6 @@ NS_IMETHODIMP nsNativeDetectorFactory::CreateInstance(
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
NS_IMETHODIMP nsNativeDetectorFactory::LockFactory(PRBool aLock)
|
NS_IMETHODIMP nsNativeDetectorFactory::LockFactory(PRBool aLock)
|
||||||
{
|
{
|
||||||
if(aLock)
|
|
||||||
PR_AtomicIncrement( &g_LockCount );
|
|
||||||
else
|
|
||||||
PR_AtomicDecrement( &g_LockCount );
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -315,11 +315,9 @@ nsJISx4501LineBreaker::nsJISx4501LineBreaker(
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
nsJISx4501LineBreaker::~nsJISx4501LineBreaker()
|
nsJISx4501LineBreaker::~nsJISx4501LineBreaker()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS1(nsJISx4501LineBreaker, nsILineBreaker);
|
NS_IMPL_ISUPPORTS1(nsJISx4501LineBreaker, nsILineBreaker);
|
||||||
|
|
|
@ -25,10 +25,4 @@
|
||||||
|
|
||||||
#include "prtypes.h"
|
#include "prtypes.h"
|
||||||
|
|
||||||
#define g_InstanceCount lwbrk_g_InstanceCount
|
|
||||||
#define g_LockCount lwbrk_g_LockCount
|
|
||||||
|
|
||||||
extern "C" PRInt32 g_InstanceCount;
|
|
||||||
extern "C" PRInt32 g_LockCount;
|
|
||||||
|
|
||||||
#endif /* nsLWBRKDll_h___ */
|
#endif /* nsLWBRKDll_h___ */
|
||||||
|
|
|
@ -30,11 +30,9 @@
|
||||||
nsLWBreakerFImp::nsLWBreakerFImp()
|
nsLWBreakerFImp::nsLWBreakerFImp()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
nsLWBreakerFImp::~nsLWBreakerFImp()
|
nsLWBreakerFImp::~nsLWBreakerFImp()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_DEFINE_IID(kILineBreakerFactoryIID, NS_ILINEBREAKERFACTORY_IID);
|
NS_DEFINE_IID(kILineBreakerFactoryIID, NS_ILINEBREAKERFACTORY_IID);
|
||||||
|
|
|
@ -27,9 +27,6 @@
|
||||||
#include "nsLWBreakerFImp.h"
|
#include "nsLWBreakerFImp.h"
|
||||||
#include "nsLWBRKDll.h"
|
#include "nsLWBRKDll.h"
|
||||||
|
|
||||||
PRInt32 g_InstanceCount = 0;
|
|
||||||
PRInt32 g_LockCount = 0;
|
|
||||||
|
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsLWBreakerFImp)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsLWBreakerFImp)
|
||||||
|
|
||||||
static nsModuleComponentInfo components[] = {
|
static nsModuleComponentInfo components[] = {
|
||||||
|
|
|
@ -28,11 +28,9 @@
|
||||||
nsSampleWordBreaker::nsSampleWordBreaker()
|
nsSampleWordBreaker::nsSampleWordBreaker()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
nsSampleWordBreaker::~nsSampleWordBreaker()
|
nsSampleWordBreaker::~nsSampleWordBreaker()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS1(nsSampleWordBreaker, nsIWordBreaker);
|
NS_IMPL_ISUPPORTS1(nsSampleWordBreaker, nsIWordBreaker);
|
||||||
|
|
|
@ -63,13 +63,11 @@ NS_IMPL_ISUPPORTS1(nsCharsetAlias2, nsICharsetAlias);
|
||||||
nsCharsetAlias2::nsCharsetAlias2()
|
nsCharsetAlias2::nsCharsetAlias2()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
mDelegate = nsnull; // delay the load of mDelegate untill we need it.
|
mDelegate = nsnull; // delay the load of mDelegate untill we need it.
|
||||||
}
|
}
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
nsCharsetAlias2::~nsCharsetAlias2()
|
nsCharsetAlias2::~nsCharsetAlias2()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
if(mDelegate)
|
if(mDelegate)
|
||||||
delete mDelegate;
|
delete mDelegate;
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,14 +176,12 @@ nsCharsetConverterManager::nsCharsetConverterManager()
|
||||||
:mDataBundle(NULL), mTitleBundle(NULL)
|
:mDataBundle(NULL), mTitleBundle(NULL)
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCharsetConverterManager::~nsCharsetConverterManager()
|
nsCharsetConverterManager::~nsCharsetConverterManager()
|
||||||
{
|
{
|
||||||
NS_IF_RELEASE(mDataBundle);
|
NS_IF_RELEASE(mDataBundle);
|
||||||
NS_IF_RELEASE(mTitleBundle);
|
NS_IF_RELEASE(mTitleBundle);
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult nsCharsetConverterManager::RegisterConverterManagerData()
|
nsresult nsCharsetConverterManager::RegisterConverterManagerData()
|
||||||
|
|
|
@ -371,7 +371,6 @@ nsIRDFResource * nsCharsetMenu::kRDF_type = NULL;
|
||||||
nsCharsetMenu::nsCharsetMenu()
|
nsCharsetMenu::nsCharsetMenu()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
|
|
||||||
nsresult res = NS_OK;
|
nsresult res = NS_OK;
|
||||||
|
|
||||||
|
@ -396,8 +395,6 @@ nsCharsetMenu::~nsCharsetMenu()
|
||||||
FreeMenuItemArray(&mComposerMenu);
|
FreeMenuItemArray(&mComposerMenu);
|
||||||
|
|
||||||
FreeResources();
|
FreeResources();
|
||||||
|
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXX collapse these 2 in one
|
// XXX collapse these 2 in one
|
||||||
|
|
|
@ -57,7 +57,6 @@ NS_IMPL_ISUPPORTS(nsMacCharset, kIPlatformCharsetIID);
|
||||||
nsMacCharset::nsMacCharset()
|
nsMacCharset::nsMacCharset()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
PR_AtomicIncrement(&gCnt);
|
PR_AtomicIncrement(&gCnt);
|
||||||
|
|
||||||
// XXX we should make the following block critical section
|
// XXX we should make the following block critical section
|
||||||
|
@ -94,7 +93,6 @@ nsMacCharset::nsMacCharset()
|
||||||
}
|
}
|
||||||
nsMacCharset::~nsMacCharset()
|
nsMacCharset::~nsMacCharset()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
PR_AtomicDecrement(&gCnt);
|
PR_AtomicDecrement(&gCnt);
|
||||||
if((0 == gCnt) && (nsnull != gInfo)) {
|
if((0 == gCnt) && (nsnull != gInfo)) {
|
||||||
delete gInfo;
|
delete gInfo;
|
||||||
|
|
|
@ -59,7 +59,6 @@ NS_IMPL_ISUPPORTS1(nsOS2Charset, nsIPlatformCharset);
|
||||||
nsOS2Charset::nsOS2Charset()
|
nsOS2Charset::nsOS2Charset()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
PR_AtomicIncrement(&gCnt); // count for gInfo
|
PR_AtomicIncrement(&gCnt); // count for gInfo
|
||||||
|
|
||||||
// XXX We should make the following block critical section
|
// XXX We should make the following block critical section
|
||||||
|
@ -91,7 +90,6 @@ nsOS2Charset::nsOS2Charset()
|
||||||
|
|
||||||
nsOS2Charset::~nsOS2Charset()
|
nsOS2Charset::~nsOS2Charset()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
PR_AtomicDecrement(&gCnt);
|
PR_AtomicDecrement(&gCnt);
|
||||||
if(0 == gCnt) {
|
if(0 == gCnt) {
|
||||||
delete gInfo;
|
delete gInfo;
|
||||||
|
@ -113,10 +111,8 @@ class nsOS2CharsetFactory : public nsIFactory {
|
||||||
public:
|
public:
|
||||||
nsOS2CharsetFactory() {
|
nsOS2CharsetFactory() {
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
virtual ~nsOS2CharsetFactory() {
|
virtual ~nsOS2CharsetFactory() {
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHOD CreateInstance(nsISupports* aDelegate, const nsIID& aIID, void** aResult);
|
NS_IMETHOD CreateInstance(nsISupports* aDelegate, const nsIID& aIID, void** aResult);
|
||||||
|
@ -148,10 +144,6 @@ NS_IMETHODIMP nsOS2CharsetFactory::CreateInstance(
|
||||||
}
|
}
|
||||||
NS_IMETHODIMP nsOS2CharsetFactory::LockFactory(PRBool aLock)
|
NS_IMETHODIMP nsOS2CharsetFactory::LockFactory(PRBool aLock)
|
||||||
{
|
{
|
||||||
if(aLock)
|
|
||||||
PR_AtomicIncrement( &g_LockCount );
|
|
||||||
else
|
|
||||||
PR_AtomicDecrement( &g_LockCount );
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,11 +43,9 @@ public:
|
||||||
nsTextToSubURI::nsTextToSubURI()
|
nsTextToSubURI::nsTextToSubURI()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
nsTextToSubURI::~nsTextToSubURI()
|
nsTextToSubURI::~nsTextToSubURI()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS1(nsTextToSubURI, nsITextToSubURI)
|
NS_IMPL_ISUPPORTS1(nsTextToSubURI, nsITextToSubURI)
|
||||||
|
|
|
@ -58,7 +58,7 @@ NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
|
||||||
|
|
||||||
extern "C" NS_EXPORT PRBool NSCanUnload(nsISupports* aServMgr)
|
extern "C" NS_EXPORT PRBool NSCanUnload(nsISupports* aServMgr)
|
||||||
{
|
{
|
||||||
return PRBool(g_InstanceCount == 0 && g_LockCount == 0);
|
return PR_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* aServMgr,
|
extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* aServMgr,
|
||||||
|
|
|
@ -25,9 +25,6 @@
|
||||||
|
|
||||||
#include "nsISupports.h"
|
#include "nsISupports.h"
|
||||||
|
|
||||||
extern "C" PRInt32 g_InstanceCount;
|
|
||||||
extern "C" PRInt32 g_LockCount;
|
|
||||||
|
|
||||||
// Factory methods
|
// Factory methods
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|
|
@ -67,9 +67,6 @@ NS_DEFINE_CID(kUnicodeToCP1252CID, NS_UNICODETOCP1252_CID);
|
||||||
NS_DEFINE_CID(kUnicodeToMacRomanCID, NS_UNICODETOMACROMAN_CID);
|
NS_DEFINE_CID(kUnicodeToMacRomanCID, NS_UNICODETOMACROMAN_CID);
|
||||||
NS_DEFINE_CID(kUnicodeToUTF8CID, NS_UNICODETOUTF8_CID);
|
NS_DEFINE_CID(kUnicodeToUTF8CID, NS_UNICODETOUTF8_CID);
|
||||||
|
|
||||||
PRInt32 g_InstanceCount = 0;
|
|
||||||
PRInt32 g_LockCount = 0;
|
|
||||||
|
|
||||||
class nsUConvModule : public nsIModule {
|
class nsUConvModule : public nsIModule {
|
||||||
public:
|
public:
|
||||||
nsUConvModule();
|
nsUConvModule();
|
||||||
|
@ -87,8 +84,6 @@ protected:
|
||||||
PRBool mInitialized;
|
PRBool mInitialized;
|
||||||
};
|
};
|
||||||
|
|
||||||
static NS_DEFINE_IID(kIModuleIID, NS_IMODULE_IID);
|
|
||||||
|
|
||||||
nsUConvModule::nsUConvModule()
|
nsUConvModule::nsUConvModule()
|
||||||
: mInitialized(PR_FALSE)
|
: mInitialized(PR_FALSE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,7 +25,4 @@
|
||||||
|
|
||||||
#include "prtypes.h"
|
#include "prtypes.h"
|
||||||
|
|
||||||
extern PRInt32 g_InstanceCount;
|
|
||||||
extern PRInt32 g_LockCount;
|
|
||||||
|
|
||||||
#endif /* nsUCvMinDll_h___ */
|
#endif /* nsUCvMinDll_h___ */
|
||||||
|
|
|
@ -37,12 +37,10 @@
|
||||||
nsBasicDecoderSupport::nsBasicDecoderSupport()
|
nsBasicDecoderSupport::nsBasicDecoderSupport()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBasicDecoderSupport::~nsBasicDecoderSupport()
|
nsBasicDecoderSupport::~nsBasicDecoderSupport()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -351,12 +349,10 @@ NS_IMETHODIMP nsOneByteDecoderSupport::Reset()
|
||||||
nsBasicEncoder::nsBasicEncoder()
|
nsBasicEncoder::nsBasicEncoder()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBasicEncoder::~nsBasicEncoder()
|
nsBasicEncoder::~nsBasicEncoder()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -78,7 +78,6 @@ static PRInt32 gCnt=0;
|
||||||
nsUNIXCharset::nsUNIXCharset()
|
nsUNIXCharset::nsUNIXCharset()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
PR_AtomicIncrement(&gCnt);
|
PR_AtomicIncrement(&gCnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +123,6 @@ nsUNIXCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsAutoString& locale,
|
||||||
|
|
||||||
nsUNIXCharset::~nsUNIXCharset()
|
nsUNIXCharset::~nsUNIXCharset()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
PR_AtomicDecrement(&gCnt);
|
PR_AtomicDecrement(&gCnt);
|
||||||
if(0 == gCnt) {
|
if(0 == gCnt) {
|
||||||
if (gNLInfo) {
|
if (gNLInfo) {
|
||||||
|
|
|
@ -86,12 +86,10 @@ NS_IMPL_ISUPPORTS1(nsUnicodeDecodeHelper, nsIUnicodeDecodeHelper)
|
||||||
nsUnicodeDecodeHelper::nsUnicodeDecodeHelper()
|
nsUnicodeDecodeHelper::nsUnicodeDecodeHelper()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsUnicodeDecodeHelper::~nsUnicodeDecodeHelper()
|
nsUnicodeDecodeHelper::~nsUnicodeDecodeHelper()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -80,12 +80,10 @@ NS_IMPL_ISUPPORTS1(nsUnicodeEncodeHelper, nsIUnicodeEncodeHelper)
|
||||||
nsUnicodeEncodeHelper::nsUnicodeEncodeHelper()
|
nsUnicodeEncodeHelper::nsUnicodeEncodeHelper()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsUnicodeEncodeHelper::~nsUnicodeEncodeHelper()
|
nsUnicodeEncodeHelper::~nsUnicodeEncodeHelper()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -56,7 +56,6 @@ NS_IMPL_ISUPPORTS1(nsWinCharset, nsIPlatformCharset)
|
||||||
nsWinCharset::nsWinCharset()
|
nsWinCharset::nsWinCharset()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
PR_AtomicIncrement(&gCnt); // count for gInfo
|
PR_AtomicIncrement(&gCnt); // count for gInfo
|
||||||
|
|
||||||
// XXX We should make the following block critical section
|
// XXX We should make the following block critical section
|
||||||
|
@ -87,7 +86,6 @@ nsWinCharset::nsWinCharset()
|
||||||
}
|
}
|
||||||
nsWinCharset::~nsWinCharset()
|
nsWinCharset::~nsWinCharset()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
PR_AtomicDecrement(&gCnt);
|
PR_AtomicDecrement(&gCnt);
|
||||||
if(0 == gCnt) {
|
if(0 == gCnt) {
|
||||||
delete gInfo;
|
delete gInfo;
|
||||||
|
|
|
@ -25,8 +25,5 @@
|
||||||
|
|
||||||
#include "prtypes.h"
|
#include "prtypes.h"
|
||||||
|
|
||||||
extern "C" PRInt32 g_InstanceCount;
|
|
||||||
extern "C" PRInt32 g_LockCount;
|
|
||||||
|
|
||||||
#define g_AsciiMapping ucvcn_g_AsciiMapping
|
#define g_AsciiMapping ucvcn_g_AsciiMapping
|
||||||
#endif /* nsUCvCnDll_h___ */
|
#endif /* nsUCvCnDll_h___ */
|
||||||
|
|
|
@ -37,12 +37,10 @@
|
||||||
nsBasicDecoderSupport::nsBasicDecoderSupport()
|
nsBasicDecoderSupport::nsBasicDecoderSupport()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBasicDecoderSupport::~nsBasicDecoderSupport()
|
nsBasicDecoderSupport::~nsBasicDecoderSupport()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -351,12 +349,10 @@ NS_IMETHODIMP nsOneByteDecoderSupport::Reset()
|
||||||
nsBasicEncoder::nsBasicEncoder()
|
nsBasicEncoder::nsBasicEncoder()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBasicEncoder::~nsBasicEncoder()
|
nsBasicEncoder::~nsBasicEncoder()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -38,7 +38,4 @@
|
||||||
|
|
||||||
#include "prtypes.h"
|
#include "prtypes.h"
|
||||||
|
|
||||||
extern PRInt32 g_InstanceCount;
|
|
||||||
extern PRInt32 g_LockCount;
|
|
||||||
|
|
||||||
#endif /* nsUCvIBMDll_h___ */
|
#endif /* nsUCvIBMDll_h___ */
|
||||||
|
|
|
@ -50,12 +50,10 @@
|
||||||
nsBasicDecoderSupport::nsBasicDecoderSupport()
|
nsBasicDecoderSupport::nsBasicDecoderSupport()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBasicDecoderSupport::~nsBasicDecoderSupport()
|
nsBasicDecoderSupport::~nsBasicDecoderSupport()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -364,12 +362,10 @@ NS_IMETHODIMP nsOneByteDecoderSupport::Reset()
|
||||||
nsBasicEncoder::nsBasicEncoder()
|
nsBasicEncoder::nsBasicEncoder()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBasicEncoder::~nsBasicEncoder()
|
nsBasicEncoder::~nsBasicEncoder()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -25,8 +25,6 @@
|
||||||
|
|
||||||
#include "prtypes.h"
|
#include "prtypes.h"
|
||||||
|
|
||||||
extern PRInt32 g_InstanceCount;
|
|
||||||
extern PRInt32 g_LockCount;
|
|
||||||
extern PRUint16 g_ut0201Mapping[];
|
extern PRUint16 g_ut0201Mapping[];
|
||||||
extern PRUint16 g_ut0208Mapping[];
|
extern PRUint16 g_ut0208Mapping[];
|
||||||
extern PRUint16 g_ut0212Mapping[];
|
extern PRUint16 g_ut0212Mapping[];
|
||||||
|
|
|
@ -37,12 +37,10 @@
|
||||||
nsBasicDecoderSupport::nsBasicDecoderSupport()
|
nsBasicDecoderSupport::nsBasicDecoderSupport()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBasicDecoderSupport::~nsBasicDecoderSupport()
|
nsBasicDecoderSupport::~nsBasicDecoderSupport()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -351,12 +349,10 @@ NS_IMETHODIMP nsOneByteDecoderSupport::Reset()
|
||||||
nsBasicEncoder::nsBasicEncoder()
|
nsBasicEncoder::nsBasicEncoder()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBasicEncoder::~nsBasicEncoder()
|
nsBasicEncoder::~nsBasicEncoder()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -25,10 +25,6 @@
|
||||||
|
|
||||||
#include "prtypes.h"
|
#include "prtypes.h"
|
||||||
|
|
||||||
extern "C" PRInt32 g_InstanceCount;
|
|
||||||
extern "C" PRInt32 g_LockCount;
|
|
||||||
|
|
||||||
|
|
||||||
extern "C" PRUint16 g_utKSC5601Mapping[];
|
extern "C" PRUint16 g_utKSC5601Mapping[];
|
||||||
extern "C" PRUint16 g_ufKSC5601Mapping[];
|
extern "C" PRUint16 g_ufKSC5601Mapping[];
|
||||||
#define g_AsciiMapping ucvko_g_AsciiMapping
|
#define g_AsciiMapping ucvko_g_AsciiMapping
|
||||||
|
|
|
@ -37,12 +37,10 @@
|
||||||
nsBasicDecoderSupport::nsBasicDecoderSupport()
|
nsBasicDecoderSupport::nsBasicDecoderSupport()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBasicDecoderSupport::~nsBasicDecoderSupport()
|
nsBasicDecoderSupport::~nsBasicDecoderSupport()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -351,12 +349,10 @@ NS_IMETHODIMP nsOneByteDecoderSupport::Reset()
|
||||||
nsBasicEncoder::nsBasicEncoder()
|
nsBasicEncoder::nsBasicEncoder()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBasicEncoder::~nsBasicEncoder()
|
nsBasicEncoder::~nsBasicEncoder()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -151,12 +151,10 @@ nsUnicodeToX11Johab::nsUnicodeToX11Johab()
|
||||||
v = 0;
|
v = 0;
|
||||||
t = 0;
|
t = 0;
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
nsUnicodeToX11Johab::~nsUnicodeToX11Johab()
|
nsUnicodeToX11Johab::~nsUnicodeToX11Johab()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 41
|
// 41
|
||||||
|
|
|
@ -28,7 +28,4 @@
|
||||||
#define g_InstanceCount ucvlatin_g_InstanceCount
|
#define g_InstanceCount ucvlatin_g_InstanceCount
|
||||||
#define g_LockCount ucvlatin_g_LockCount
|
#define g_LockCount ucvlatin_g_LockCount
|
||||||
|
|
||||||
extern PRInt32 g_InstanceCount;
|
|
||||||
extern PRInt32 g_LockCount;
|
|
||||||
|
|
||||||
#endif /* nsUCvLatinDll_h___ */
|
#endif /* nsUCvLatinDll_h___ */
|
||||||
|
|
|
@ -37,12 +37,10 @@
|
||||||
nsBasicDecoderSupport::nsBasicDecoderSupport()
|
nsBasicDecoderSupport::nsBasicDecoderSupport()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBasicDecoderSupport::~nsBasicDecoderSupport()
|
nsBasicDecoderSupport::~nsBasicDecoderSupport()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -351,12 +349,10 @@ NS_IMETHODIMP nsOneByteDecoderSupport::Reset()
|
||||||
nsBasicEncoder::nsBasicEncoder()
|
nsBasicEncoder::nsBasicEncoder()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBasicEncoder::~nsBasicEncoder()
|
nsBasicEncoder::~nsBasicEncoder()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -36,7 +36,4 @@
|
||||||
|
|
||||||
#include "prtypes.h"
|
#include "prtypes.h"
|
||||||
|
|
||||||
extern PRInt32 g_InstanceCount;
|
|
||||||
extern PRInt32 g_LockCount;
|
|
||||||
|
|
||||||
#endif /* nsUCvMathDll_h___ */
|
#endif /* nsUCvMathDll_h___ */
|
||||||
|
|
|
@ -47,12 +47,10 @@
|
||||||
nsBasicDecoderSupport::nsBasicDecoderSupport()
|
nsBasicDecoderSupport::nsBasicDecoderSupport()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBasicDecoderSupport::~nsBasicDecoderSupport()
|
nsBasicDecoderSupport::~nsBasicDecoderSupport()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -361,12 +359,10 @@ NS_IMETHODIMP nsOneByteDecoderSupport::Reset()
|
||||||
nsBasicEncoder::nsBasicEncoder()
|
nsBasicEncoder::nsBasicEncoder()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBasicEncoder::~nsBasicEncoder()
|
nsBasicEncoder::~nsBasicEncoder()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -25,8 +25,6 @@
|
||||||
|
|
||||||
#include "prtypes.h"
|
#include "prtypes.h"
|
||||||
|
|
||||||
extern "C" PRInt32 g_InstanceCount;
|
|
||||||
extern "C" PRInt32 g_LockCount;
|
|
||||||
extern "C" PRUint16 g_ufBig5Mapping[];
|
extern "C" PRUint16 g_ufBig5Mapping[];
|
||||||
extern "C" PRUint16 g_utBIG5Mapping[];
|
extern "C" PRUint16 g_utBIG5Mapping[];
|
||||||
extern "C" PRUint16 g_ASCIIMapping[];
|
extern "C" PRUint16 g_ASCIIMapping[];
|
||||||
|
|
|
@ -37,12 +37,10 @@
|
||||||
nsBasicDecoderSupport::nsBasicDecoderSupport()
|
nsBasicDecoderSupport::nsBasicDecoderSupport()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBasicDecoderSupport::~nsBasicDecoderSupport()
|
nsBasicDecoderSupport::~nsBasicDecoderSupport()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -351,12 +349,10 @@ NS_IMETHODIMP nsOneByteDecoderSupport::Reset()
|
||||||
nsBasicEncoder::nsBasicEncoder()
|
nsBasicEncoder::nsBasicEncoder()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBasicEncoder::~nsBasicEncoder()
|
nsBasicEncoder::~nsBasicEncoder()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -25,9 +25,6 @@
|
||||||
|
|
||||||
#include "prtypes.h"
|
#include "prtypes.h"
|
||||||
|
|
||||||
extern "C" PRInt32 g_InstanceCount;
|
|
||||||
extern "C" PRInt32 g_LockCount;
|
|
||||||
|
|
||||||
extern "C" PRUint16 g_ASCIIMappingTable[] ;
|
extern "C" PRUint16 g_ASCIIMappingTable[] ;
|
||||||
extern "C" PRUint16 g_ufCNS1MappingTable[];
|
extern "C" PRUint16 g_ufCNS1MappingTable[];
|
||||||
extern "C" PRUint16 g_ufCNS2MappingTable[];
|
extern "C" PRUint16 g_ufCNS2MappingTable[];
|
||||||
|
|
|
@ -37,12 +37,10 @@
|
||||||
nsBasicDecoderSupport::nsBasicDecoderSupport()
|
nsBasicDecoderSupport::nsBasicDecoderSupport()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBasicDecoderSupport::~nsBasicDecoderSupport()
|
nsBasicDecoderSupport::~nsBasicDecoderSupport()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -351,12 +349,10 @@ NS_IMETHODIMP nsOneByteDecoderSupport::Reset()
|
||||||
nsBasicEncoder::nsBasicEncoder()
|
nsBasicEncoder::nsBasicEncoder()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBasicEncoder::~nsBasicEncoder()
|
nsBasicEncoder::~nsBasicEncoder()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -198,13 +198,11 @@ nsBidi::nsBidi(PRUint32 aMaxLength, PRUint32 aMaxRunCount)
|
||||||
nsBidi::~nsBidi()
|
nsBidi::~nsBidi()
|
||||||
{
|
{
|
||||||
Free();
|
Free();
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsBidi::Init()
|
void nsBidi::Init()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
/* reset the object, all pointers NULL, all flags PR_FALSE, all sizes 0 */
|
/* reset the object, all pointers NULL, all flags PR_FALSE, all sizes 0 */
|
||||||
mLength = 0;
|
mLength = 0;
|
||||||
mParaLevel = 0;
|
mParaLevel = 0;
|
||||||
|
|
|
@ -213,12 +213,10 @@ static PRUint16 gArabicLigatureMap[] =
|
||||||
nsBidiUtilsImp::nsBidiUtilsImp()
|
nsBidiUtilsImp::nsBidiUtilsImp()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBidiUtilsImp::~nsBidiUtilsImp()
|
nsBidiUtilsImp::~nsBidiUtilsImp()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsBidiUtilsImp::GetBidiCategory(PRUnichar aChar, eBidiCategory* oResult)
|
NS_IMETHODIMP nsBidiUtilsImp::GetBidiCategory(PRUnichar aChar, eBidiCategory* oResult)
|
||||||
|
|
|
@ -430,12 +430,10 @@ nsCaseConversionImp2::nsCaseConversionImp2()
|
||||||
gLowerMap = new nsCompressedMap(NS_REINTERPRET_CAST(PRUnichar*, &gToLower[0]), gToLowerItems);
|
gLowerMap = new nsCompressedMap(NS_REINTERPRET_CAST(PRUnichar*, &gToLower[0]), gToLowerItems);
|
||||||
}
|
}
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCaseConversionImp2::~nsCaseConversionImp2()
|
nsCaseConversionImp2::~nsCaseConversionImp2()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
if (--gInit == 0) {
|
if (--gInit == 0) {
|
||||||
delete gUpperMap;
|
delete gUpperMap;
|
||||||
gUpperMap = nsnull;
|
gUpperMap = nsnull;
|
||||||
|
|
|
@ -33,12 +33,10 @@ NS_IMPL_ISUPPORTS1(nsCategoryImp, nsIUGenCategory);
|
||||||
nsCategoryImp::nsCategoryImp()
|
nsCategoryImp::nsCategoryImp()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCategoryImp::~nsCategoryImp()
|
nsCategoryImp::~nsCategoryImp()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult nsCategoryImp::Get( PRUnichar aChar, nsUGenCategory* oResult)
|
nsresult nsCategoryImp::Get( PRUnichar aChar, nsUGenCategory* oResult)
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
nsCharsOrderIdFormater::nsCharsOrderIdFormater( nsCharsList* aList)
|
nsCharsOrderIdFormater::nsCharsOrderIdFormater( nsCharsList* aList)
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
mList = aList;
|
mList = aList;
|
||||||
mBase = aList->Length();
|
mBase = aList->Length();
|
||||||
}
|
}
|
||||||
|
@ -36,7 +35,6 @@ nsCharsOrderIdFormater::nsCharsOrderIdFormater( nsCharsList* aList)
|
||||||
nsCharsOrderIdFormater::~nsCharsOrderIdFormater()
|
nsCharsOrderIdFormater::~nsCharsOrderIdFormater()
|
||||||
{
|
{
|
||||||
delete mList;
|
delete mList;
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHOD ToString( PRUint32 aOrder, nsString& aResult)
|
NS_IMETHOD ToString( PRUint32 aOrder, nsString& aResult)
|
||||||
|
@ -64,20 +62,14 @@ class nsCharsOrderIdFormaterFactory : public nsIFactory {
|
||||||
public:
|
public:
|
||||||
nsCharsOrderIdFormaterFactory(const nsCID &aCID) {
|
nsCharsOrderIdFormaterFactory(const nsCID &aCID) {
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AutomicIncrement(&g_InstanceCount);
|
|
||||||
mCID = aCID;
|
mCID = aCID;
|
||||||
};
|
};
|
||||||
virtual ~nsCharsOrderIdFormaterFactory() {
|
virtual ~nsCharsOrderIdFormaterFactory() {
|
||||||
PR_AutomicDecrement(&g_InstanceCount);
|
|
||||||
};
|
};
|
||||||
NS_IMETHOD CreateInstance(nsISupports *aDelegate,
|
NS_IMETHOD CreateInstance(nsISupports *aDelegate,
|
||||||
const nsIID &aIID,
|
const nsIID &aIID,
|
||||||
void **aResult);
|
void **aResult);
|
||||||
NS_IMETHOD LockFactory(PRBool aLock) {
|
NS_IMETHOD LockFactory(PRBool aLock) {
|
||||||
if(aLock)
|
|
||||||
PR_AutomicIncrement(&g_LockCount);
|
|
||||||
else
|
|
||||||
PR_AutomicDecrement(&g_LockCount);
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -129,11 +129,9 @@ NS_IMPL_ISUPPORTS1(nsHankakuToZenkaku, nsITextTransform)
|
||||||
nsHankakuToZenkaku::nsHankakuToZenkaku()
|
nsHankakuToZenkaku::nsHankakuToZenkaku()
|
||||||
{
|
{
|
||||||
NS_INIT_REFCNT();
|
NS_INIT_REFCNT();
|
||||||
PR_AtomicIncrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
nsHankakuToZenkaku::~nsHankakuToZenkaku()
|
nsHankakuToZenkaku::~nsHankakuToZenkaku()
|
||||||
{
|
{
|
||||||
PR_AtomicDecrement(&g_InstanceCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsHankakuToZenkaku::Change( nsString& aText, nsString& aResult)
|
NS_IMETHODIMP nsHankakuToZenkaku::Change( nsString& aText, nsString& aResult)
|
||||||
|
|
|
@ -25,10 +25,4 @@
|
||||||
|
|
||||||
#include "prtypes.h"
|
#include "prtypes.h"
|
||||||
|
|
||||||
#define g_InstanceCount nsUcharUtilModule_g_InstanceCount
|
|
||||||
#define g_LockCount nsUcharUtilModule_g_LockCount
|
|
||||||
|
|
||||||
extern "C" PRInt32 g_InstanceCount;
|
|
||||||
extern "C" PRInt32 g_LockCount;
|
|
||||||
|
|
||||||
#endif /* nsUUDll_h__ */
|
#endif /* nsUUDll_h__ */
|
||||||
|
|
|
@ -80,9 +80,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidi)
|
||||||
// Since our class still refer to this two per dll global leave it here untill
|
// Since our class still refer to this two per dll global leave it here untill
|
||||||
// we change their code
|
// we change their code
|
||||||
|
|
||||||
PRInt32 g_InstanceCount = 0;
|
|
||||||
PRInt32 g_LockCount = 0;
|
|
||||||
|
|
||||||
static nsModuleComponentInfo components[] =
|
static nsModuleComponentInfo components[] =
|
||||||
{
|
{
|
||||||
{ "Unichar Utility", NS_UNICHARUTIL_CID,
|
{ "Unichar Utility", NS_UNICHARUTIL_CID,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче