Replace nsIUrlListenerManager by an nsTObserverArray.

RESOLVED FIXED in Thunderbird 3.0b1

Status

MailNews Core
Backend
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: standard8, Assigned: standard8)

Tracking

({memory-footprint, perf})

Trunk
Thunderbird 3.0b1
memory-footprint, perf

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

10 years ago
Created attachment 345075 [details] [diff] [review]
The fix

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

Comment 1

10 years ago
Created attachment 345077 [details] [diff] [review]
The fix v2

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)

Updated

10 years ago
Attachment #345077 - Flags: superreview?(bienvenu)
Attachment #345077 - Flags: superreview+
Attachment #345077 - Flags: review?(bienvenu)
Attachment #345077 - Flags: review+

Comment 2

10 years ago
Comment on attachment 345077 [details] [diff] [review]
The fix v2

very nice cleanup.
(Assignee)

Comment 3

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