tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit c29dc57a54b34c57a1c3cde65ec7b59807f395e2
parent 0dc5144eb03fc2d0036427739f958c6a07a2d56c
Author: Andrea Marchesini <amarchesini@mozilla.com>
Date:   Thu, 13 Nov 2025 01:03:26 +0000

Bug 1999479 - Fix the IPP-activation add-on after the introduction of the IPPProxyManager state machine, r=ip-protection-reviewers,fchasen

Differential Revision: https://phabricator.services.mozilla.com/D272146

Diffstat:
Mbrowser/extensions/ipp-activator/extension/api/parent/ext-ipp.js | 21++++++---------------
1 file changed, 6 insertions(+), 15 deletions(-)

diff --git a/browser/extensions/ipp-activator/extension/api/parent/ext-ipp.js b/browser/extensions/ipp-activator/extension/api/parent/ext-ipp.js @@ -7,8 +7,8 @@ const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { ExtensionParent: "resource://gre/modules/ExtensionParent.sys.mjs", - IPProtectionService: - "resource:///modules/ipprotection/IPProtectionService.sys.mjs", + IPPProxyManager: "resource:///modules/ipprotection/IPPProxyManager.sys.mjs", + IPPProxyStates: "resource:///modules/ipprotection/IPPProxyManager.sys.mjs", }); ChromeUtils.defineLazyGetter(lazy, "tabTracker", () => { @@ -33,23 +33,18 @@ this.ippActivator = class extends ExtensionAPI { context, name: "ippActivator.onIPPActivated", register: fire => { - const topics = [ - "IPProtectionService:StateChanged", - "IPProtectionService:Started", - "IPProtectionService:Stopped", - "IPProtectionService:SignedOut", - ]; + const topics = ["IPPProxyManager:StateChanged"]; const observer = _event => { fire.async(); }; topics.forEach(topic => - lazy.IPProtectionService.addEventListener(topic, observer) + lazy.IPPProxyManager.addEventListener(topic, observer) ); return () => { topics.forEach(topic => - lazy.IPProtectionService.removeEventListener(topic, observer) + lazy.IPPProxyManager.removeEventListener(topic, observer) ); }; }, @@ -82,11 +77,7 @@ this.ippActivator = class extends ExtensionAPI { } }, isIPPActive() { - if ("state" in lazy.IPProtectionService) { - return lazy.IPProtectionService.state === "active"; - } - - return !!lazy.IPProtectionService.isActive; + return lazy.IPPProxyManager.state === lazy.IPPProxyStates.ACTIVE; }, getDynamicTabBreakages() { try {