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>
Thu, 20 Jun 2019 17:48:50 +0000 (18:48 +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 582abcb6263d269f1fd0e3c87cdf7394edfa9ec4..47eff70fc1ac69387b1bb70634cd4441eb19c671 100644 (file)
@@ -255,6 +255,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) {