Closed Bug 1350690 Opened 2 years ago Closed 2 years ago

Add main thread assertion to nsSystemInfo::Init()

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

Details

Attachments

(1 file)

nsSystemInfo::Init() is main thread only, on Windows. It would make it easier to notice violations of this by adding a main thread assert on all platforms.
Comment on attachment 8852525 [details]
Bug 1350690 - Add main thread assertion to nsSystemInfo::Init().

https://reviewboard.mozilla.org/r/124716/#review127238

I'm not necessarily opposed to this, but is this any easier to notice than the `MOZ_CRASH` calls in the observer service itself?  I guess the assert is more immediately obvious.
Attachment #8852525 - Flags: review?(nfroyd) → review+
The point is that on non-Windows platforms nsSystemInfo::Init() does not use the observer service, so there will be no assertion without my patch. This is annoying if you are only testing on Linux or OSX.
Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0b650a8b8117
Add main thread assertion to nsSystemInfo::Init(). r=froydnj
https://hg.mozilla.org/mozilla-central/rev/0b650a8b8117
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.