mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Rearranged the code slightly
This commit is contained in:
parent
4c1086e760
commit
cea06649ed
@ -63,7 +63,7 @@ public:
|
||||
}
|
||||
// dtor decrements it.
|
||||
~nsInstanceCounter() {
|
||||
PR_AtomicIncrement( &mInstanceCount );
|
||||
PR_AtomicDecrement( &mInstanceCount );
|
||||
}
|
||||
// Tests whether shared library can be unloaded.
|
||||
static PRBool CanUnload() {
|
||||
@ -83,7 +83,12 @@ private:
|
||||
|
||||
#define NS_DEFINE_MODULE_INSTANCE_COUNTER() \
|
||||
PRInt32 nsInstanceCounter::mInstanceCount = 0; \
|
||||
PRInt32 nsInstanceCounter::mLockCount = 0;
|
||||
PRInt32 nsInstanceCounter::mLockCount = 0; \
|
||||
/* NSCanUnload implementation */\
|
||||
extern "C" NS_EXPORT PRBool \
|
||||
NSCanUnload( nsISupports* ) { \
|
||||
return nsInstanceCounter::CanUnload(); \
|
||||
} \
|
||||
|
||||
// Declare component-global class.
|
||||
class nsAppShellComponentImpl {
|
||||
@ -402,11 +407,6 @@ NSGetFactory( nsISupports *aServiceMgr, \
|
||||
} \
|
||||
return rv; \
|
||||
} \
|
||||
/* NSCanUnload implementation */\
|
||||
extern "C" NS_EXPORT PRBool \
|
||||
NSCanUnload( nsISupports* ) { \
|
||||
return nsInstanceCounter::CanUnload(); \
|
||||
} \
|
||||
NS_IMPL_IAPPSHELLCOMPONENTIMPL_CTORDTOR( className ) \
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user