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:
- browser/components/newidentity/content/newidentity.js
Changes:
=====================================
browser/components/newidentity/content/newidentity.js
=====================================
@@ -144,6 +144,7 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityButton", ()
=> {
this.clearStorage();
this.clearPreferencesAndPermissions();
await this.clearData();
+ await this.reloadAddons();
this.clearConnections();
this.clearPrivateSession();
}
@@ -414,6 +415,15 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityButton", ()
=> {
Services.obs.notifyObservers(null, "last-pb-context-exited");
}
+ async reloadAddons() {
+ logger.info("Reloading add-ons to clear their temporary state.");
+ // Reload all active extensions except search engines, which would throw.
+ const addons = (
+ await AddonManager.getAddonsByTypes(["extension"])
+ ).filter(a => a.isActive && !a.id.endsWith("@search.mozilla.org"));
+ await Promise.all(addons.map(a => a.reload()));
+ }
+
// Broadcast as a hook to clear other data
broadcast() {
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/64c5d915e37966513a83e7e897e945b091bc3108
--
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/64c5d915e37966513a83e7e897e945b091bc3108
You're receiving this email because of your account on gitlab.torproject.org.
_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits