commit 6fddeb8926d444cecb942fcfd7e44208a718aae1
parent d60c7c078bfee64add1dd4b025632db20eb0f477
Author: Andrea Marchesini <amarchesini@mozilla.com>
Date: Tue, 16 Dec 2025 13:52:44 +0000
Bug 2006323 - IPProtection: consider the VPN add-on as uninstalled when onUninstalling event is triggered, r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D276650
Diffstat:
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/browser/components/ipprotection/IPPVPNAddonHelper.sys.mjs b/browser/components/ipprotection/IPPVPNAddonHelper.sys.mjs
@@ -36,6 +36,16 @@ class VPNAddonHelperSingleton {
lazy.IPProtectionService.updateState();
}
},
+
+ onUninstalling(addon) {
+ // In some scenarios, the add-on is not fully uninstalled, but it's set
+ // in a pending state. When this happens, `onUninstalled` is not
+ // triggered. Let's use `onUninstalling` instead.
+ if (addon.id === VPN_ADDON_ID) {
+ self.#vpnAddonDetected = false;
+ lazy.IPProtectionService.updateState();
+ }
+ },
};
lazy.AddonManager.addAddonListener(this.addonVPNListener);