ContentParent has accumulated some weird bits in GetSingleton that don't really make sense to me. OnAccelerationChange is also funky, as it attempts to get a singleton for what is presumably the current object.
Comment on attachment 499775 [details] [diff] [review] Clean up ContentParent cruft. I really hate that all the observer-adding is done in GetSingleton anyway. If you're going to refactor this, please move all that into an Init() method. That way when we have multiple content processes we don't have to touch this all yet again.
Attachment #499775 - Flags: review?(benjamin) → review-
Here's the Init() version. I also noticed that the current thread observer mechanism will break when we move to multiple content processes, but that's not something I want to address right now.
Attachment #511038 - Flags: review?(benjamin)
Comment on attachment 511038 [details] [diff] [review] Clean up ContentParent cruft. This is good cleanup of some code that's become a bit of a dumping ground.
Comment on attachment 511038 [details] [diff] [review] Clean up ContentParent cruft. Can you provide a risk/reward analysis? I really don't want to go taking cleanup patches at this point unless they fix some known issue.
Nevermind, there's no real need to take this right now.
Attachment #499775 - Attachment is obsolete: true
This patch doesn't apply cleanly on trunk anymore.
Attachment #511038 - Attachment is obsolete: true
Status: NEW → RESOLVED
Last Resolved: 8 years ago
No longer depends on: post2.0
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.2
You need to log in before you can comment on or make changes to this bug.