Closed Bug 612568 Opened 9 years ago Closed 9 years ago

HTML5 fragment parser doesn't drop nsIContent handles until deleted

Categories

(Core :: DOM: HTML Parser, defect, major)

defect
Not set
major

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- -

People

(Reporter: hsivonen, Assigned: hsivonen)

Details

Attachments

(1 file)

The HTML5 parser uses nsIContent**s as handles to nodes. The allocated handle space is only freed when the tree builder is freed. In the case of a fragment parser, this means the handles are freed only once the document that has a fragment parser goes away.

In the fragment parser case, the handles should be freed after each fragment parse run.
Nominating as a blocker, because this mean that keeping open a page like the TBPL will use up more and more memory until the tab is closed.
blocking2.0: --- → ?
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Comment on attachment 490853 [details] [diff] [review]
Drop nsIContent handles when finished parsing a fragment

This bit really should have been part of the fix for bug 559311.
Attachment #490853 - Flags: review?(Olli.Pettay)
Attachment #490853 - Flags: review?(Olli.Pettay) → review+
Comment on attachment 490853 [details] [diff] [review]
Drop nsIContent handles when finished parsing a fragment

I don't think this blocks, but I have no problems with this change landing now. Approving patch.
Attachment #490853 - Flags: approval2.0+
blocking2.0: ? → -
Thanks.

http://hg.mozilla.org/mozilla-central/rev/a74526663273
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.