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

This commit is contained in:
beard%netscape.com 1998-12-17 18:19:40 +00:00
Родитель a195a1c87a
Коммит 499259c8a6
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -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;
}