Replace UrlbarPrefsObserver with an ordered list of weak observers internal to UrlbarPrefs
Categories
(Firefox :: Address Bar, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: adw, Assigned: adw)
References
Details
Attachments
(1 file)
This is spun out from https://phabricator.services.mozilla.com/D85904. Instead of having UrlbarPrefsObserver.observe
call UrlbarPrefs._onPrefChanged
as implemented in that revision, we can have UrlbarPrefs
keep an ordered list of observers so we can guarantee that observers are called in the order they're added. The problem is that unless observers are held weakly, they have to be unregistered at some point (e.g., when windows go away if the observers are tied to windows). We can use weak references to avoid that.
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Comment 2•4 years ago
•
|
||
Try looks good, no leaks or failures: https://treeherder.mozilla.org/#/jobs?repo=try&revision=7ec3d5afd64af8d7fdf3be63bf7a0024c1f3ddb2
Edit: This push includes a stripped-down version of https://phabricator.services.mozilla.com/D85904 that adds UrlbarInput
as a pref observer, so that patch should be good to go as far as the pref observer portion is concerned.
Comment 4•4 years ago
|
||
bugherder |
Description
•