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

[tor-commits] [Git][tpo/applications/tor-browser][base-browser-115.1.0esr-13.0-1] fixup! Bug 40926: Implemented the New Identity feature



Title: GitLab

ma1 pushed to branch base-browser-115.1.0esr-13.0-1 at The Tor Project / Applications / Tor Browser

Commits:

  • 64c5d915
    by hackademix at 2023-08-21T14:30:10+02:00
    fixup! Bug 40926: Implemented the New Identity feature
    
    Bug 41833: Reload extensions on new identity
    

1 changed file:

Changes:

  • browser/components/newidentity/content/newidentity.js
    ... ... @@ -144,6 +144,7 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityButton", () => {
    144 144
           this.clearStorage();
    
    145 145
           this.clearPreferencesAndPermissions();
    
    146 146
           await this.clearData();
    
    147
    +      await this.reloadAddons();
    
    147 148
           this.clearConnections();
    
    148 149
           this.clearPrivateSession();
    
    149 150
         }
    
    ... ... @@ -414,6 +415,15 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityButton", () => {
    414 415
           Services.obs.notifyObservers(null, "last-pb-context-exited");
    
    415 416
         }
    
    416 417
     
    
    418
    +    async reloadAddons() {
    
    419
    +      logger.info("Reloading add-ons to clear their temporary state.");
    
    420
    +      // Reload all active extensions except search engines, which would throw.
    
    421
    +      const addons = (
    
    422
    +        await AddonManager.getAddonsByTypes(["extension"])
    
    423
    +      ).filter(a => a.isActive && !a.id.endsWith("@search.mozilla.org"));
    
    424
    +      await Promise.all(addons.map(a => a.reload()));
    
    425
    +    }
    
    426
    +
    
    417 427
         // Broadcast as a hook to clear other data
    
    418 428
     
    
    419 429
         broadcast() {
    

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