$OpenBSD$ index 7b6e335..2cf2583 100644 --- toolkit/mozapps/extensions/internal/PluginProvider.jsm.orig Fri Feb 20 15:40:39 2015 +++ toolkit/mozapps/extensions/internal/PluginProvider.jsm Fri Feb 20 15:40:39 2015 @@ -52,6 +52,7 @@ var PluginProvider = { plugins: null, startup: function PL_startup() { + Services.obs.addObserver(this, "plugins-policy-changed", false); Services.obs.addObserver(this, LIST_UPDATED_TOPIC, false); Services.obs.addObserver(this, AddonManager.OPTIONS_NOTIFICATION_DISPLAYED, false); }, @@ -64,6 +65,7 @@ var PluginProvider = { this.plugins = null; Services.obs.removeObserver(this, AddonManager.OPTIONS_NOTIFICATION_DISPLAYED); Services.obs.removeObserver(this, LIST_UPDATED_TOPIC); + Services.obs.removeObserver(this, "plugins-policy-changed"); }, observe: function(aSubject, aTopic, aData) { @@ -89,6 +91,15 @@ var PluginProvider = { if (this.plugins) this.updatePluginList(); break; + case "plugins-policy-changed": + var plugin_policy = aData + if (!this.plugins) + this.plugins =[]; + this.updatePluginList(); + Services.obs.notifyObservers(null, + "plugin-provider-after-changed-policy", + plugin_policy); + break; } },