From 57d078a5553c3360fe3bcb6369f459209c7ca74f Mon Sep 17 00:00:00 2001 From: "michaelp%netscape.com" Date: Wed, 12 Aug 1998 22:06:00 +0000 Subject: [PATCH] with -np plugins will no longer be initialized due to frames. git-svn-id: svn://10.0.0.236/trunk@7883 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsWebShell.cpp | 7 ++++++- mozilla/webshell/src/nsWebShell.cpp | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index 9b7ba2a5f04..864425c70fe 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -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, diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index 9b7ba2a5f04..864425c70fe 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -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,