user scripts aren't unregistered when context is getting closed
Categories
(WebExtensions :: General, defect, P1)
Tracking
(firefox97 fixed)
Tracking | Status | |
---|---|---|
firefox97 | --- | fixed |
People
(Reporter: willdurand, Assigned: willdurand)
References
Details
(Whiteboard: [addons-jira])
Attachments
(1 file)
We call unregisterContentScripts()
when the context is getting closed here: https://searchfox.org/mozilla-central/source/toolkit/components/extensions/parent/ext-userScripts.js#95-99 but the problem is that registeredScriptIds
is an empty set because we don't add any scriptId
when we register a user script (in userScripts.register()
a few lines below).
We should add the scriptId
of a newly registered user script to the registeredScriptIds
set so that we unregister all of them when the context is being closed.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
We register a function that is called when the context is getting closed
but this function relies on a set of script IDs that is always empty,
because we don't add any IDs to it when we register a user script. This
patch adds script IDs of registered user scripts to this set.
Pushed by wdurand@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5eb78be7a83c Add `scriptId` to `registeredScriptIds` to be able to unregister all user scripts when context is being closed. r=rpl
Updated•2 years ago
|
Comment 3•2 years ago
|
||
bugherder |
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Description
•