From 36d1bb04a41d8919eddabbf83ceb338973fbdaa3 Mon Sep 17 00:00:00 2001 From: "beard%netscape.com" Date: Thu, 17 Dec 1998 18:19:40 +0000 Subject: [PATCH] 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 --- mozilla/plugin/oji/MRJ/plugin/Source/MRJPlugin.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mozilla/plugin/oji/MRJ/plugin/Source/MRJPlugin.cpp b/mozilla/plugin/oji/MRJ/plugin/Source/MRJPlugin.cpp index 1ec45a524ba..3b1e6e45626 100644 --- a/mozilla/plugin/oji/MRJ/plugin/Source/MRJPlugin.cpp +++ b/mozilla/plugin/oji/MRJ/plugin/Source/MRJPlugin.cpp @@ -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; }