Closed Bug 615355 Opened 10 years ago Closed 10 years ago

Remove the assertion at the beginning of nsChromeRegistry::Init

Categories

(Core :: XPCOM, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b8

People

(Reporter: ehsan, Assigned: ehsan)

Details

Attachments

(1 file)

<http://mxr.mozilla.org/mozilla-central/source/chrome/src/nsChromeRegistry.cpp#184>

This assertion doesn't really assert what it advertizes (because GetIOService will initialize the IO service if it's not already initialized), and it changes the time we initialize the IO service in debug and non-debug builds (this is actually the call which triggers the service initialization in debug builds).

We should just remove this assertion, I think.

This is a follow-up from bug 614286 (see bug 614286 comment 25 for more info).
Hmm.  So originally, this used to be an actual null-check, not an assert, because ill-behaved extensions could enter this code before the necko factory was even registered, which caused us to not be able to get the IOService here (because we simply didn't know how to).

Looks like this check was changed to an assert in bug 568691 part C.

Given that, I would be fine with removing the assert.
I can write the patch before one can say Jack Robinson, but I'll wait for Benjamin to chime in first.
r=me to remove the assert. We usually do get the IO service soon after that (processing the first chrome registration line), but I don't think there's a way for extensions to cause this kind of badness any more.
Attached patch Patch (v1)Splinter Review
OK, then, I'm taking comment 3 as r+, and will proceed to ask for approval directly!  :-)
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #494130 - Flags: review+
Attachment #494130 - Flags: approval2.0?
Comment on attachment 494130 [details] [diff] [review]
Patch (v1)

a=me
Attachment #494130 - Flags: approval2.0? → approval2.0+
Whiteboard: [needs landing]
http://hg.mozilla.org/mozilla-central/rev/98fa9c0cff7a
Whiteboard: [needs landing]
Target Milestone: --- → mozilla2.0b8
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.