with -np plugins will no longer be initialized due to frames.

This commit is contained in:
michaelp@netscape.com
1998-08-12 22:06:00 +00:00
parent 84ec042715
commit ae2fc6043b
2 changed files with 12 additions and 2 deletions

View File

@@ -225,6 +225,7 @@ protected:
static nsIPluginHost *mPluginHost;
static nsIPluginManager *mPluginManager;
static PRBool mPluginInited;
};
//----------------------------------------------------------------------
@@ -258,6 +259,7 @@ static NS_DEFINE_IID(kILinkHandlerIID, NS_ILINKHANDLER_IID);
nsIPluginHost *nsWebShell::mPluginHost = nsnull;
nsIPluginManager *nsWebShell::mPluginManager = nsnull;
PRBool nsWebShell::mPluginInited = PR_FALSE;
nsresult nsWebShell::CreatePluginHost(void)
{
@@ -454,9 +456,12 @@ nsWebShell::Init(nsNativeWidget aNativeParent,
//be associated with the nsIContentViewerContainer interfaces,
//not the nsIWebShell interfaces. this is a hack. MMP
if (PR_TRUE == aAllowPlugins)
if ((PR_TRUE == aAllowPlugins) && (PR_FALSE == mPluginInited))
CreatePluginHost();
//never attempt to initialize plugins again...
mPluginInited = PR_TRUE;
mScrollPref = aScrolling;
WEB_TRACE(WEB_TRACE_CALLS,