Closed
Bug 1941792
Opened 1 month ago
Closed 1 month ago
Stop using weak ref in DownloadsCommon.sys.mjs
Categories
(Firefox :: Downloads Panel, task)
Firefox
Downloads Panel
Tracking
()
RESOLVED
FIXED
136 Branch
Tracking | Status | |
---|---|---|
firefox136 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
The PrefObserver
uses aHoldWeak
parameter of the addObserver
, but the PrefObserver
lives longer than the observer list, given
the list is cleared at xpcom-shutdown, but the system modules are unloaded after that.
Thus, using strong reference there doesn't leak the observer, and using strong reference is necessary after bug 1941472 to explicitly keep the observer alive.
var PrefObserver = {
QueryInterface: ChromeUtils.generateQI([
"nsIObserver",
"nsISupportsWeakReference",
]),
...
register(prefs) {
...
kPrefBranch.addObserver("", this, true);
Assignee | ||
Comment 1•1 month ago
|
||
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/8d8e22d0e7be
Stop using weak ref in DownloadsCommon.sys.mjs. r=Gijs
Comment 3•1 month ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
status-firefox136:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•