Closed Bug 242524 Opened 21 years ago Closed 20 years ago

Component lists should hold references to real components (not "duplicates")

Categories

(SeaMonkey :: Installer, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ajschult784, Assigned: ajschult784)

References

Details

(Keywords: memory-leak)

Attachments

(2 files)

The setup types' component lists are created from "duplicates" of the relevant components. These duplicates aren't real copies of the components. See http://lxr.mozilla.org/mozilla/source/xpinstall/wizard/unix/src2/nsComponent.cpp#83 The reason given in the code for doing this duplication is so that the component's "next" pointer can be preserved. But the fact that each individual component knows what is "next" seems a bit silly. That is why there's a list in the first place! Additionally, deleting the duplicates is rather tricky since the member pointers point at other component's memory. The current code artificially inflates the ref counter so it won't try. Rather than add another hack, I think there should be another list item class that points at a component and the next item. The component list becomes a list of items.
QA Contact: bugzilla → agracebush
Attached patch patchSplinter Review
this patch 1. moves "next" for a component into the component list 2. convert consumers of nsComponent::GetNext to use nsComponentList::GetNext. there were a lot of these. Parts of nsXIEngine were depending on being able to walk through the list starting at a particular component. This was not really necessary as it would happily skip what came before. This (along with bug 238741) blurs the line between CRCCheckDownloadedArchives and ExistAllXPIs... they can probably get merged later.
Attachment #149007 - Flags: review?(bsmedberg)
Attachment #149007 - Flags: superreview?(dveditz)
Attachment #149007 - Flags: review?(bsmedberg)
Attachment #149007 - Flags: review+
Product: Browser → Seamonkey
Comment on attachment 149007 [details] [diff] [review] patch sr=dveditz
Attachment #149007 - Flags: superreview?(dveditz) → superreview+
Attached patch merged to trunkSplinter Review
fixed
Status: NEW → RESOLVED
Closed: 20 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: