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

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



Title: GitLab

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

Commits:

  • 4459daa5
    by hackademix at 2023-08-21T11:07:43+02:00
    fixup! Bug 40926: Implemented the New Identity feature
    
    Remove useless and confusing EXPORTED_SYMBOLS usage in ScriptLoader inclusion.
    
  • b6f6eb79
    by hackademix at 2023-08-21T11:07:44+02:00
    fixup! Bug 40926: Implemented the New Identity feature
    
    Remove redundant "Closing tabs" logging.
    
  • 80c57ed8
    by hackademix at 2023-08-21T11:08:16+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
    1 1
     "use strict";
    
    2 2
     
    
    3
    -var EXPORTED_SYMBOLS = ["NewIdentityButton"];
    
    4
    -
    
    5 3
     /* globals CustomizableUI Services gFindBarInitialized gFindBar
    
    6 4
        OpenBrowserWindow PrivateBrowsingUtils XPCOMUtils
    
    7 5
      */
    
    ... ... @@ -144,6 +142,7 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityButton", () => {
    144 142
           this.clearStorage();
    
    145 143
           this.clearPreferencesAndPermissions();
    
    146 144
           await this.clearData();
    
    145
    +      await this.reloadAddons();
    
    147 146
           this.clearConnections();
    
    148 147
           this.clearPrivateSession();
    
    149 148
         }
    
    ... ... @@ -160,7 +159,6 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityButton", () => {
    160 159
         }
    
    161 160
     
    
    162 161
         closeTabs() {
    
    163
    -      logger.info("Closing tabs");
    
    164 162
           if (
    
    165 163
             !Services.prefs.getBoolPref("browser.new_identity.close_newnym", true)
    
    166 164
           ) {
    
    ... ... @@ -414,6 +412,15 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityButton", () => {
    414 412
           Services.obs.notifyObservers(null, "last-pb-context-exited");
    
    415 413
         }
    
    416 414
     
    
    415
    +    async reloadAddons() {
    
    416
    +      logger.info("Reloading add-ons to clear their temporary state.");
    
    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()));
    
    422
    +    }
    
    423
    +
    
    417 424
         // Broadcast as a hook to clear other data
    
    418 425
     
    
    419 426
         broadcast() {
    

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