From: Mike Hommey Date: Sat, 27 Sep 2008 17:17:39 +0200 Subject: Don't register plugins if the MOZILLA_DISABLE_PLUGINS environment variable is set --- dom/plugins/base/nsPluginHost.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp index 4cc7d89..deeb0df 100644 --- a/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp @@ -301,6 +301,10 @@ nsPluginHost::nsPluginHost() Preferences::AddStrongObserver(this, "plugin.disable"); } + const char *env = PR_GetEnv("MOZILLA_DISABLE_PLUGINS"); + if (env && env[0]) + mPluginsDisabled = PR_TRUE; + nsCOMPtr obsService = mozilla::services::GetObserverService(); if (obsService) {