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
1 changed file:
Changes:
... | ... | @@ -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() {
|