Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor Browser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Applications
Tor Browser
Commits
0537009f
Verified
Commit
0537009f
authored
Aug 21, 2023
by
ma1
Browse files
Options
Downloads
Patches
Plain Diff
fixup! Bug 40926: Implemented the New Identity feature
Bug 41833: Reload extensions on new identity
parent
a2098747
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
browser/components/newidentity/content/newidentity.js
+10
-0
10 additions, 0 deletions
browser/components/newidentity/content/newidentity.js
with
10 additions
and
0 deletions
browser/components/newidentity/content/newidentity.js
+
10
−
0
View file @
0537009f
...
...
@@ -142,6 +142,7 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityButton", () => {
this
.
clearStorage
();
this
.
clearPreferencesAndPermissions
();
await
this
.
clearData
();
await
this
.
reloadAddons
();
this
.
clearConnections
();
this
.
clearPrivateSession
();
}
...
...
@@ -411,6 +412,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
()
{
...
...
This diff is collapsed.
Click to expand it.
ma1
@ma1
mentioned in merge request
!730 (merged)
·
Aug 21, 2023
mentioned in merge request
!730 (merged)
mentioned in merge request !730
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment