Remove the assertion at the beginning of nsChromeRegistry::Init

RESOLVED FIXED in mozilla2.0b8

Status

()

RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

Trunk
mozilla2.0b8
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
<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.
(Assignee)

Comment 2

8 years ago
I can write the patch before one can say Jack Robinson, but I'll wait for Benjamin to chime in first.

Comment 3

8 years ago
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.
(Assignee)

Comment 4

8 years ago
Created attachment 494130 [details] [diff] [review]
Patch (v1)

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+
(Assignee)

Updated

8 years ago
Whiteboard: [needs landing]
(Assignee)

Comment 6

8 years ago
http://hg.mozilla.org/mozilla-central/rev/98fa9c0cff7a
Whiteboard: [needs landing]
Target Milestone: --- → mozilla2.0b8
(Assignee)

Updated

8 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.