Closed
Bug 398880
Opened 18 years ago
Closed 18 years ago
getElementsByClassName('') leaks an nsVoidArray
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9beta2
People
(Reporter: jruderman, Assigned: jruderman)
Details
(Keywords: memory-leak, testcase)
Attachments
(2 files)
|
91 bytes,
text/html
|
Details | |
|
891 bytes,
patch
|
sayrer
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
getElementsByClassName('') leaks an nsVoidArray. I have a testcase and a patch.
I found this leak with one of my own tools, but it looks like the test suite file
http://lxr.mozilla.org/mozilla/source/content/base/test/test_bug357450.js should have caught this. Is nobody running mochitests with trace-refcnt? (See bug 397724 for doing so on a Tinderbox machine.)
| Assignee | ||
Comment 1•18 years ago
|
||
Attachment #283870 -
Flags: superreview?(jst)
Attachment #283870 -
Flags: review?(sayrer)
| Assignee | ||
Updated•18 years ago
|
Assignee: nobody → jruderman
| Assignee | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
Comment 2•18 years ago
|
||
(In reply to comment #0)
> Is nobody running mochitests with trace-refcnt? (See
> bug 397724 for doing so on a Tinderbox machine.)
I've done it, but last time I did so, we were leaking an nsVoidArray on every shutdown so I probably missed this.
Updated•18 years ago
|
Attachment #283870 -
Flags: review?(sayrer) → review+
Comment 3•18 years ago
|
||
Comment on attachment 283870 [details] [diff] [review]
patch
+ delete classes;
+ classes = nsnull;
You don't need to null out classes here, but sr=jst either way.
Attachment #283870 -
Flags: superreview?(jst) → superreview+
| Assignee | ||
Comment 4•18 years ago
|
||
I'm pretty sure I have to null out |classes|, since it can be deleted (again) in the next |if| block.
| Assignee | ||
Updated•18 years ago
|
Attachment #283870 -
Flags: approval1.9?
Comment 5•18 years ago
|
||
Comment on attachment 283870 [details] [diff] [review]
patch
Oh, duh, you're right of course.
Updated•18 years ago
|
Flags: blocking1.9?
Updated•18 years ago
|
Flags: blocking1.9? → blocking1.9+
Comment 6•18 years ago
|
||
Comment on attachment 283870 [details] [diff] [review]
patch
This is a blocker. No need for approval once the tree reopens, unless you want to try to get approval for beta.
Attachment #283870 -
Flags: approval1.9?
| Assignee | ||
Updated•18 years ago
|
Target Milestone: --- → mozilla1.9 M10
| Assignee | ||
Comment 7•18 years ago
|
||
Patch landed.
Marking as "in-testsuite+" because this is covered by an existing mochitest, as mentioned in comment 0. Bug 397724 will get all those tests running with leak-checking enabled.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•