[X2Go-Commits] [pale-moon] 42/102: [BASILISK] Align browser glue with TychoAM for enableable add-ons.
git-admin at x2go.org
git-admin at x2go.org
Mon Feb 25 23:25:48 CET 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch upstream/28.4.0
in repository pale-moon.
commit 2cbbc5de4596ef3436685fa3316eeed9af700249
Author: wolfbeast <mcwerewolf at wolfbeast.com>
Date: Mon Jan 28 15:56:37 2019 +0100
[BASILISK] Align browser glue with TychoAM for enableable add-ons.
---
application/basilisk/components/nsBrowserGlue.js | 40 ++++++++++++------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/application/basilisk/components/nsBrowserGlue.js b/application/basilisk/components/nsBrowserGlue.js
index c2e2153..d77e97f 100644
--- a/application/basilisk/components/nsBrowserGlue.js
+++ b/application/basilisk/components/nsBrowserGlue.js
@@ -1080,24 +1080,19 @@ BrowserGlue.prototype = {
// For any add-ons that were installed disabled and can be enabled offer
// them to the user.
- let win = RecentWindow.getMostRecentBrowserWindow();
- AddonManager.getAllAddons(addons => {
- for (let addon of addons) {
- // If this add-on has already seen (or seen is undefined for non-XPI
- // add-ons) then skip it.
- if (addon.seen !== false) {
- continue;
- }
-
- // If this add-on cannot be enabled (either already enabled or
- // appDisabled) then skip it.
- if (!(addon.permissions & AddonManager.PERM_CAN_ENABLE)) {
- continue;
- }
-
- win.openUILinkIn("about:newaddon?id=" + addon.id, "tab");
- }
- });
+ let changedIDs = AddonManager.getStartupChanges(AddonManager.STARTUP_CHANGE_INSTALLED);
+ if (changedIDs.length > 0) {
+ let win = this.getMostRecentBrowserWindow();
+ AddonManager.getAddonsByIDs(changedIDs, function(aAddons) {
+ aAddons.forEach(function(aAddon) {
+ // If the add-on isn't user disabled or can't be enabled then skip it.
+ if (!aAddon.userDisabled || !(aAddon.permissions & AddonManager.PERM_CAN_ENABLE))
+ return;
+
+ win.openUILinkIn("about:newaddon?id=" + aAddon.id, "tab");
+ })
+ });
+ }
let signingRequired;
if (AppConstants.MOZ_REQUIRE_SIGNING) {
@@ -1110,10 +1105,15 @@ BrowserGlue.prototype = {
let disabledAddons = AddonManager.getStartupChanges(AddonManager.STARTUP_CHANGE_DISABLED);
AddonManager.getAddonsByIDs(disabledAddons, (addons) => {
for (let addon of addons) {
- if (addon && addon.type == "experiment")
+ // WEs return null, skip.
+ if (!addon) {
+ continue;
+ }
+
+ if (addon.type == "experiment")
continue;
- if (addon && addon.signedState <= AddonManager.SIGNEDSTATE_MISSING) {
+ if (addon.signedState <= AddonManager.SIGNEDSTATE_MISSING) {
this._notifyUnsignedAddonsDisabled();
break;
}
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pale-moon.git
More information about the x2go-commits
mailing list