Closed
Bug 43579
Opened 25 years ago
Closed 25 years ago
nsStdURL held past XPCOM shutdown
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Core
CSS Parsing and Computation
Tracking
()
M17
People
(Reporter: dbaron, Assigned: attinasi)
References
Details
(Keywords: memory-leak)
Attachments
(1 file)
(deleted),
patch
|
Details | Diff | Splinter Review |
StyleSetImpl::EnableQuirkStylesheet holds its static nsIURI url defined at
http://lxr.mozilla.org/seamonkey/source/layout/base/src/nsStyleSet.cpp#604
past XPCOM shutdown, leaking 1 nsStdURL (and some other things it owns, I
think).
Assignee | ||
Comment 2•25 years ago
|
||
The leak is a nuisance, but it causes no harm since the memory is used until
the program ends. I will change the code to use a member-variable to hold the
URI as a COMPtr so that it does not show up as a leak and clutter the leak
report, however that means we will have to create a new instance every time
there is a new StyleSet created, which will make it slower (immeasurably, I
believe).
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•25 years ago
|
||
Assignee | ||
Comment 4•25 years ago
|
||
David, can you check the patch I attached and tell me what you think? Thanks.
Keywords: patch
Assignee | ||
Updated•25 years ago
|
Target Milestone: --- → M17
Reporter | ||
Comment 5•25 years ago
|
||
Looks reasonable to me. Since we only create 8 nsStyleSet over the life of the
browser when running the bloat tests it doesn't look like much performance cost.
(If it were, or if you think it is, significant then you could hold a global
variable counting the number of nsStyleSet, make the URI static, and release it
when the count goes to 0.) The one thing that seems a little strange is
putting a function call inside a macro (NS_SUCCEEDED). It's OK in this
particular case, but I'd think it's bad style. If I count as a reviewer (which
I'm never completely sure of...) then r=dbaron (including if you change the
NS_SUCCEEDED to 2 steps).
Assignee | ||
Comment 6•25 years ago
|
||
Marking as a dup of 43656 since Inaky has a handle on a fix that will make the
erported leak go away and will keep the URL instance static. David, I'll add you
to the CC on that one so you can continue to track it.
*** This bug has been marked as a duplicate of 43656 ***
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Comment 7•24 years ago
|
||
Verified dupe, particularly as the entire discussion in this bug seem to have
moved over to 43656.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•