Closed Bug 830125 Opened 12 years ago Closed 12 years ago

Avoid a potential recursive GetService call in the Preferences memory reporting code

Categories

(Core :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21
Tracking Status
b2g18 --- fixed

People

(Reporter: justin.lebar+bug, Assigned: justin.lebar+bug)

References

Details

Attachments

(1 file)

See the patch which I'll attach in a moment. This is necessary to avoid a recursive GetService assertion with the patch in bug 809949.
Attached patch Patch, v1Splinter Review
Attachment #701588 - Flags: review?(n.nethercote)
Assignee: nobody → justin.lebar+bug
Comment on attachment 701588 [details] [diff] [review] Patch, v1 Review of attachment 701588 [details] [diff] [review]: ----------------------------------------------------------------- Looks fine. It's annoying we have to do this kind of stuff, though. It reminds me a lot of bug 810196, which was about similar cases where we can't do straightforward reporter registration due to a different constraint. For those cases, I was thinking about attempting to register the memory reporter service earlier in the XPCOM start-up sequence. ::: modules/libpref/src/Preferences.cpp @@ +252,5 @@ > > gObserverTable = new nsRefPtrHashtable<ValueObserverHashKey, ValueObserver>(); > gObserverTable->Init(); > > + // Preferences;:GetInstanceForService() can be called from GetService(), and Typo: ";:"
Attachment #701588 - Flags: review?(n.nethercote) → review+
> It's annoying we have to do this kind of stuff, though. I agree. Doing things on startup (and shutdown) in Gecko is hard. :-/
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Comment on attachment 701588 [details] [diff] [review] Patch, v1 [Approval Request Comment] Simple patch, needed for bug 809949.
Attachment #701588 - Flags: approval-mozilla-b2g18?
Attachment #701588 - Flags: approval-mozilla-b2g18? → approval-mozilla-b2g18+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: