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>
Tue, 11 Dec 2018 23:29:04 +0000 (23:29 +0000)
Gbp-Pq: Topic debian-hacks
Gbp-Pq: Name Don-t-register-plugins-if-the-MOZILLA_DISABLE_PLUGIN.patch

dom/plugins/base/nsPluginHost.cpp

index 8748a18a7e1a33f5fa665f5c5cf9d2432f66efa9..f523db6d13bc217e396b528fb0995d81ca67edfc 100644 (file)
@@ -262,6 +262,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) {