Closed Bug 170201 Opened 22 years ago Closed 22 years ago

leaks of nsDocument::mPrincipal

Categories

(Core :: DOM: Core & HTML, defect, P2)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla1.2beta

People

(Reporter: dbaron, Assigned: dbaron)

Details

(Keywords: memory-leak, Whiteboard: [tind-mlk][patch])

Attachments

(1 file)

There are some leaks I see starting and exiting mozilla (some
nsAggregatePrincipal and nsCodebasePrincipal and nsSimpleURI objects) that are
caused by bad refcounting of nsDocument's mPrincipal member.  There are a bunch
of places where it is assigned into without releasing the old value.  Rather
than figure out which one was triggering the leak, I just converted it to
nsCOMPtr -- the new code in the patch I'm about to attach should (I think) be
equivalent, except that there are a bunch of places where the old value is now
released before filling in a new one.
Severity: normal → major
Status: NEW → ASSIGNED
Keywords: mlk
Priority: -- → P2
Whiteboard: [tind-mlk][patch]
Target Milestone: --- → mozilla1.2beta
Comment on attachment 100166 [details] [diff] [review]
patch converting nsDocument::mPrincipal into an nsCOMPtr

Looks fine to me. r=mstoltz.
Attachment #100166 - Flags: review+
Comment on attachment 100166 [details] [diff] [review]
patch converting nsDocument::mPrincipal into an nsCOMPtr

sr=jst
Attachment #100166 - Flags: superreview+
Fix checked in to trunk, 2002-09-23 18:27 PDT.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: