Closed Bug 467647 Opened 16 years ago Closed 16 years ago

[FIX]Leak nsDocument with <marquee>, contenteditable

Categories

(Core :: XBL, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: bzbarsky)

References

Details

(Keywords: memory-leak, testcase)

Attachments

(2 files, 1 obsolete file)

Attached file testcase
Leaks an nsDocument and a bunch of smaller stuff for a total of 240651 trace-refcnt bytes.
Jesse, you owe me for making me look at this code a second time.  :(  I'd been hoping to get away with the XXX comment...
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #351319 - Flags: superreview?(peterv)
Attachment #351319 - Flags: review?(peterv)
Summary: Leak nsDocument with <marquee>, contenteditable → [FIX]Leak nsDocument with <marquee>, contenteditable
Comment on attachment 351319 [details] [diff] [review]
Bah.  Just stop leaking ranges and nodes

How about using nsAutoTArray<nsRangeStore> rangeItemArray; and AppendElements and return early if that fails? And then make the third loop just loop over rangeItemArray without removing/deleting?
Attachment #351319 - Flags: superreview?(peterv)
Attachment #351319 - Flags: superreview+
Attachment #351319 - Flags: review?(peterv)
Attachment #351319 - Flags: review+
Attachment #351319 - Attachment is obsolete: true
Pushed http://hg.mozilla.org/mozilla-central/rev/740b5c912d25.  I added the testcase as a crashtest, but it would be really nice to have a test that just depends on XBL it includes, not on marquee being XBL.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: