Added the initial reference count. Might want to revisit this, should realy tie lifetime of the plugin itself to the CFM library.

git-svn-id: svn://10.0.0.236/trunk@16576 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
beard%netscape.com
1998-12-17 18:19:40 +00:00
parent 148860a0e0
commit 36d1bb04a4

View File

@@ -69,9 +69,10 @@ static NS_DEFINE_IID(kIWindowlessPluginInstancePeerIID, NS_IWINDOWLESSPLUGININST
nsresult NSGetFactory(const nsCID &classID, nsIFactory **aFactory)
{
if (classID.Equals(kIPluginIID)) {
static MRJPlugin thePlugin;
*aFactory = &thePlugin;
::thePlugin = &thePlugin;
static MRJPlugin thePluginSingleton;
*aFactory = &thePluginSingleton;
thePlugin = &thePluginSingleton;
thePlugin->AddRef();
// *aFactory = new MRJPlugin();
return NS_OK;
}