Closed Bug 461946 Opened 16 years ago Closed 16 years ago

Replace nsIUrlListenerManager by an nsTObserverArray.

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b1

People

(Reporter: standard8, Assigned: standard8)

Details

(Keywords: memory-footprint, perf)

Attachments

(1 file, 1 obsolete file)

Attached patch The fix (obsolete) — Splinter Review
Whilst looking at the url code for the password manager fixes, I spotted that nsIUrlListenerManager is a component that is only used by nsMsgMailNewsURL and stores an array of listeners.

This is remarkably like an nsTObserverArray and can in fact be replaced directly, hence reducing overhead quite a bit.
Attachment #345075 - Flags: superreview?(bienvenu)
Attachment #345075 - Flags: review?(bienvenu)
Attached patch The fix v2Splinter Review
The previous patch asserted when removing listeners. It turns out that due to the structure of remove listeners in mailnews, we currently attempt to remove listeners more than once. I decided I didn't want to impact that structure (in case we missed removing a listener in some instances) and hence went with the safer option of just removing the assertion and matching the behaviour with what happened before this patch.
Attachment #345075 - Attachment is obsolete: true
Attachment #345077 - Flags: superreview?(bienvenu)
Attachment #345077 - Flags: review?(bienvenu)
Attachment #345075 - Flags: superreview?(bienvenu)
Attachment #345075 - Flags: review?(bienvenu)
Attachment #345077 - Flags: superreview?(bienvenu)
Attachment #345077 - Flags: superreview+
Attachment #345077 - Flags: review?(bienvenu)
Attachment #345077 - Flags: review+
Comment on attachment 345077 [details] [diff] [review]
The fix v2

very nice cleanup.
Checked in: http://hg.mozilla.org/comm-central/rev/6442d905c13d
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: