[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/mullvad-browser][mullvad-browser-115.4.0esr-13.5-1] fixup! Bug 40926: Implemented the New Identity feature



Title: GitLab

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

Commits:

  • 77c1e6b0
    by hackademix at 2023-10-17T21:23:30+00:00
    fixup! Bug 40926: Implemented the New Identity feature
    
    Bug 42182: avoid reloading any search engine extension.
    

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
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits