ma1 pushed to branch mullvad-browser-115.4.0esr-13.0-1 at The Tor Project / Applications / Mullvad Browser

Commits:

1 changed file:

Changes:

  • browser/components/newidentity/content/newidentity.js
    ... ... @@ -415,10 +415,13 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityButton", () => {
    415 415
         async reloadAddons() {
    
    416 416
           logger.info("Reloading add-ons to clear their temporary state.");
    
    417 417
           // Reload all active extensions except search engines, which would throw.
    
    418
    -      const addons = (
    
    419
    -        await AddonManager.getAddonsByTypes(["extension"])
    
    420
    -      ).filter(a => a.isActive && !a.id.endsWith("@search.mozilla.org"));
    
    421
    -      await Promise.all(addons.map(a => a.reload()));
    
    418
    +      const addons = await AddonManager.getAddonsByTypes(["extension"]);
    
    419
    +      const isSearchEngine = async addon =>
    
    420
    +        (await (await fetch(addon.getResourceURI("manifest.json").spec)).json())
    
    421
    +          ?.chrome_settings_overrides?.search_provider;
    
    422
    +      const reloadIfNeeded = async addon =>
    
    423
    +        addon.isActive && !(await isSearchEngine(addon)) && addon.reload();
    
    424
    +      await Promise.all(addons.map(addon => reloadIfNeeded(addon)));
    
    422 425
         }
    
    423 426
     
    
    424 427
         // Broadcast as a hook to clear other data