Closed
Bug 777200
Opened 12 years ago
Closed 12 years ago
SettingsChangeNotifier should only notify processes with settings-change listeners
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
People
(Reporter: cjones, Assigned: gwagner)
References
Details
(Keywords: feature, Whiteboard: [WebAPI:P3][LOE:S])
Attachments
(1 file, 2 obsolete files)
14.75 KB,
patch
|
fabrice
:
review+
|
Details | Diff | Splinter Review |
Currently they're broadcast to all processes, if I'm reading things correctly. We should only allow processes with settings-read permissions to listen to settings changes. Christoph/Gregor, one of you guys want to take this?
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → anygregor
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #645811 -
Flags: review?(jones.chris.g)
Reporter | ||
Updated•12 years ago
|
Attachment #645811 -
Flags: review?(jones.chris.g) → review+
Reporter | ||
Comment 2•12 years ago
|
||
This doesn't completely address the problem here, but Gregor says another patch is on the way.
Updated•12 years ago
|
blocking-basecamp: --- → +
Updated•12 years ago
|
Whiteboard: [WebAPI:P3]
Comment 3•12 years ago
|
||
Comment on attachment 645811 [details] [diff] [review] patch Review of attachment 645811 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/settings/SettingsChangeNotifier.jsm @@ +38,5 @@ > > receiveMessage: function(aMessage) { > debug("receiveMessage"); > let msg = aMessage.json; > + let mm = aMessage.target.QueryInterface(Ci.nsIFrameMessageManager); The QI is no longer needed (and nsIFrameMessageManager doesn't exist anymore anyway.)
Assignee | ||
Updated•12 years ago
|
Whiteboard: [WebAPI:P3] → [WebAPI:P3][LOE:S]
Updated•12 years ago
|
Assignee | ||
Comment 4•12 years ago
|
||
This versions makes some simplifications: We have 2 notification systems for setting changes: onsettingschange is called whenever a setting changes addObserver can be used to listen to a single setting change. It gets complicated to track all additions and removal of listeners so once somebody adds an observer, the process always gets notified. I think the use-case of removing observers is pretty rare and we can ignore this. If somebody adds an observer for a single setting, we also notify the process if another setting changed. We might want to change this if it becomes a problem.
Attachment #645811 -
Attachment is obsolete: true
Attachment #663182 -
Flags: review?(fabrice)
Assignee | ||
Comment 5•12 years ago
|
||
Try run: https://tbpl.mozilla.org/?tree=Try&rev=7cd75849be4d
Comment 6•12 years ago
|
||
(In reply to Gregor Wagner [:gwagner] from comment #4) > It gets complicated to track all additions and removal of listeners so once > somebody adds an observer, the process always gets notified. > I think the use-case of removing observers is pretty rare and we can ignore > this. Won't you have to deal with child processes dying (as in bug 791910)? Also, isn't it a little weird to send messages twice to a manager that happens to have two observers?
Assignee | ||
Comment 7•12 years ago
|
||
(In reply to Blake Kaplan (:mrbkap) from comment #6) > (In reply to Gregor Wagner [:gwagner] from comment #4) > > It gets complicated to track all additions and removal of listeners so once > > somebody adds an observer, the process always gets notified. > > I think the use-case of removing observers is pretty rare and we can ignore > > this. > > Won't you have to deal with child processes dying (as in bug 791910)? Thats bug 777508. Also, > isn't it a little weird to send messages twice to a manager that happens to > have two observers? Right we don't want this. I thought I have a test for it but let me check again.
Assignee | ||
Comment 8•12 years ago
|
||
Fixed the multiple register problem.
Attachment #663182 -
Attachment is obsolete: true
Attachment #663182 -
Flags: review?(fabrice)
Attachment #663207 -
Flags: review?(fabrice)
Updated•12 years ago
|
Attachment #663207 -
Flags: review?(fabrice) → review+
Assignee | ||
Comment 9•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/24e6cf3628ae I also fixed the issue from bug 792846.
Comment 10•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/24e6cf3628ae
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
Comment 11•12 years ago
|
||
This was landed before bug 777508 (and obviously doesn't make use of that notification), so I'm removing the dependency here.
No longer depends on: 777508
You need to log in
before you can comment on or make changes to this bug.
Description
•