Closed Bug 133383 Opened 22 years ago Closed 22 years ago

nsMetaCharsetObserver destructor shouldn't call End

Categories

(Core :: Internationalization, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

References

()

Details

(Keywords: intl)

Attachments

(1 file, 1 obsolete file)

Something tries to create a parser service on shutdown.  I filed a bug to convert parser service from CID to ContractID so others could see, and I guessed it was intl, it was.

Law wrote that destructors shouldn't call remove observer. Here's a patch, I'll test it from home (my build broke and i'm out of time).
Attached patch patch (obsolete) — Splinter Review
requires patch from other bug (although a reworked version wouldn't)
Assignee: yokoyama → timeless
Depends on: 133277
Should IQA be involved in this bug? 
Keywords: intl
not really, this is a code only bug.

tao/ftang: comments?
Status: NEW → ASSIGNED
Attached patch compiling patchSplinter Review
Attachment #76091 - Attachment is obsolete: true
For some reason (because I had spoken out on a similar issue long ago), timeless
spoke to me about this issue.

After careful analysis, we've come to the conclusion that:

1. The implementations of both nsIObserverService and nsIParserService ensure
that they "remove" any still registered observers when they are destroyed
(typically, at Mozilla shutdown).

2. Therefore, it is not necessary for any object to do that unregistering at
Mozilla shutdown, since it happens anyway.

3. It is more wrong to do it in the observer's destructor, since by definition
said observer would have to have already been unregistered.

Bottom line is that I endorse the general strategy of removing the observer
removal code from the destructor (which timeless's patch does).  I have not
fully reviewed his patch, however (although I suspect he might ask me to do that
soon :-).
changing qa contact to me:)
QA Contact: ruixu → yokoyama
Blocks: 107391
*** Bug 107891 has been marked as a duplicate of this bug. ***
Attachment #76163 - Flags: superreview?(bzbarsky)
Attachment #76163 - Flags: review?(law)
Comment on attachment 76163 [details] [diff] [review]
compiling patch

Bill is not likely to actually review it; maybe try someone from intl?
Attachment #76163 - Flags: superreview?(bzbarsky)
Attachment #76163 - Flags: superreview+
Attachment #76163 - Flags: review?(yokoyama)
Attachment #76163 - Flags: review?(law)
Attachment #76163 - Flags: review?(yokoyama) → review?(alecf)
Comment on attachment 76163 [details] [diff] [review]
compiling patch

r=alecf
Attachment #76163 - Flags: review?(alecf) → review+
checked in
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: