Closed
Bug 1464252
Opened 6 years ago
Closed 6 years ago
Remove global observers functionality from the observer service
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: gsvelto, Assigned: gsvelto)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
+++ This bug was initially created as a clone of Bug #1435683 +++ While working on bug 1435683 I stumbled upon a snippet of code in the observer service used to implement "global observers" [1] by sending *all* notifications to whatever observer registers the "*" string. It looked rather weird because it's bracketed by an #ifdef statement which happens to be always defined in the same file [2]. This behavior also seems to be undocumented. Since this smelled like old cruft I decided to do some digging. First of all there doesn't seem to be any users of this code, neither in C++ nor in JS code. I did a bunch of grep's so I can't be 100% sure but looking at the observer service log I couldn't find runtime uses either when launching Firefox. Since I was curious who might have used it I hg blame'd this code only to find out that it was already present in version 1. My take on this is that it's something ancient that we haven't been using for a while but we forgot to remove. If there are no opinions against the removal (or users I might have missed) I'll just cut it. [1] https://searchfox.org/mozilla-central/rev/bf4def01bf8f6ff0d18f02f2d7e9efc73e12c63f/xpcom/ds/nsObserverService.cpp#300-305 [2] https://searchfox.org/mozilla-central/rev/bf4def01bf8f6ff0d18f02f2d7e9efc73e12c63f/xpcom/ds/nsObserverService.cpp#26
Assignee | ||
Comment 1•6 years ago
|
||
Here's a try-run with that bit removed just to check if tests fail or something: https://treeherder.mozilla.org/#/jobs?repo=try&revision=4ec37998863a97b7fb1f506b0bbf868a1b36ee4b
Assignee | ||
Comment 2•6 years ago
|
||
Alright, there doesn't seem to be any failures, let's remove this.
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → gsvelto
Status: NEW → ASSIGNED
Assignee | ||
Updated•6 years ago
|
Comment hidden (mozreview-request) |
Comment 4•6 years ago
|
||
mozreview-review |
Comment on attachment 8981085 [details] Bug 1464252 - Remove global observers functionality from the observer service; https://reviewboard.mozilla.org/r/247196/#review253288 Thank you!
Attachment #8981085 -
Flags: review?(nfroyd) → review+
Pushed by gsvelto@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e70e3d46d441 Remove global observers functionality from the observer service; r=froydnj
Comment 6•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e70e3d46d441
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in
before you can comment on or make changes to this bug.
Description
•