mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
fix for bug 10998 pointed out by rginda@ix.netcom.com. This was really just a refcounting bug
This commit is contained in:
parent
25e52a8e93
commit
6a09fe909e
@ -65,6 +65,14 @@ GetMyStack()
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
/*
|
||||
* This object holds state that we don't want to lose!
|
||||
*
|
||||
* The plan is that once created this object never goes away. We do an
|
||||
* intentional extra addref at construction to keep it around even if no one
|
||||
* is using it.
|
||||
*/
|
||||
|
||||
nsXPCThreadJSContextStackImpl::nsXPCThreadJSContextStackImpl()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
@ -83,6 +91,8 @@ nsXPCThreadJSContextStackImpl::GetSingleton()
|
||||
static nsXPCThreadJSContextStackImpl* singleton = NULL;
|
||||
if(!singleton)
|
||||
singleton = new nsXPCThreadJSContextStackImpl();
|
||||
if(singleton)
|
||||
NS_ADDREF(singleton);
|
||||
return singleton;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user