Don't register plugins if the MOZILLA_DISABLE_PLUGINS environment variable is set
authorMike Hommey <glandium@debian.org>
Sat, 27 Sep 2008 15:17:39 +0000 (17:17 +0200)
committerMike Hommey <glandium@debian.org>
Wed, 1 Jul 2020 00:08:58 +0000 (01:08 +0100)
Gbp-Pq: Topic debian-hacks
Gbp-Pq: Name Don-t-register-plugins-if-the-MOZILLA_DISABLE_PLUGIN.patch

dom/plugins/base/nsPluginHost.cpp

index 410132450dd97eab2589a04956b190f3a16ee501..e905b7a4e8eebc099d315e5d01ed2d862909f31f 100644 (file)
@@ -362,6 +362,10 @@ nsPluginHost::nsPluginHost()
 
   Preferences::AddStrongObserver(this, "plugin.disable");
 
+  const char *env = PR_GetEnv("MOZILLA_DISABLE_PLUGINS");
+  if (env && env[0])
+    mPluginsDisabled = PR_TRUE;
+
   nsCOMPtr<nsIObserverService> obsService =
       mozilla::services::GetObserverService();
   if (obsService) {