mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Put NS_INIT_REFCNT in all constructors, it says. So I moved this call out of the Initialize() method, and into the constructor. And lo! the assert went away. Magic.
This commit is contained in:
parent
e2bbc594b2
commit
70f1ea2b11
@ -60,15 +60,19 @@ protected:
|
||||
|
||||
|
||||
nsCmdLineService::nsCmdLineService()
|
||||
: mArgCount(0)
|
||||
{
|
||||
mArgCount = 0;
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
/*
|
||||
* Implement the nsISupports methods...
|
||||
*/
|
||||
NS_IMPL_ISUPPORTS(nsCmdLineService, kICommandLineServiceIID);
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCmdLineService::Initialize(int argc, char ** argv)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
PRInt32 i=0;
|
||||
nsresult rv = nsnull;
|
||||
|
||||
@ -233,14 +237,6 @@ nsCmdLineService::PrintCmdArgs()
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Implement the nsISupports methods...
|
||||
*/
|
||||
NS_IMPL_ISUPPORTS(nsCmdLineService, kICommandLineServiceIID);
|
||||
|
||||
|
||||
|
||||
|
||||
NS_EXPORT nsresult NS_NewCmdLineService(nsICmdLineService** aResult)
|
||||
{
|
||||
if (nsnull == aResult) {
|
||||
|
@ -60,15 +60,19 @@ protected:
|
||||
|
||||
|
||||
nsCmdLineService::nsCmdLineService()
|
||||
: mArgCount(0)
|
||||
{
|
||||
mArgCount = 0;
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
/*
|
||||
* Implement the nsISupports methods...
|
||||
*/
|
||||
NS_IMPL_ISUPPORTS(nsCmdLineService, kICommandLineServiceIID);
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCmdLineService::Initialize(int argc, char ** argv)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
PRInt32 i=0;
|
||||
nsresult rv = nsnull;
|
||||
|
||||
@ -233,14 +237,6 @@ nsCmdLineService::PrintCmdArgs()
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Implement the nsISupports methods...
|
||||
*/
|
||||
NS_IMPL_ISUPPORTS(nsCmdLineService, kICommandLineServiceIID);
|
||||
|
||||
|
||||
|
||||
|
||||
NS_EXPORT nsresult NS_NewCmdLineService(nsICmdLineService** aResult)
|
||||
{
|
||||
if (nsnull == aResult) {
|
||||
|
Loading…
Reference in New Issue
Block a user