Last Comment Bug 652970 - nsXULDocument doesn't unlink enough
: nsXULDocument doesn't unlink enough
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XUL (show other bugs)
: unspecified
: x86_64 All
: -- normal (vote)
: ---
Assigned To: Olli Pettay [:smaug] (high review load, please consider other reviewers)
:
Mentors:
Depends on:
Blocks: strongparent
  Show dependency treegraph
 
Reported: 2011-04-26 14:38 PDT by Olli Pettay [:smaug] (high review load, please consider other reviewers)
Modified: 2011-04-27 09:02 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (1.97 KB, patch)
2011-04-26 14:38 PDT, Olli Pettay [:smaug] (high review load, please consider other reviewers)
no flags Details | Diff | Review
patch (2.62 KB, patch)
2011-04-27 05:04 PDT, Olli Pettay [:smaug] (high review load, please consider other reviewers)
peterv: review+
Details | Diff | Review

Description Olli Pettay [:smaug] (high review load, please consider other reviewers) 2011-04-26 14:38:53 PDT
Created attachment 528442 [details] [diff] [review]
patch

If nodes' ownerDocument is made a strong, we leak XULDocuments because it doesn't
unlink mTemplateBuilderTable.
Comment 1 Peter Van der Beken [:peterv] 2011-04-27 00:42:18 PDT
Comment on attachment 528442 [details] [diff] [review]
patch

Would it make sense to make nsXULDocument::SetTemplateBuilderFor check if aBuilder is non-null before creating a new BuilderTable? I'm worried about unlinking of other objects ending up calling SetTemplateBuilderFor with a null aBuilder.
Add a comment that we should unlink all the other stuff that we traverse too.
Comment 2 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2011-04-27 05:04:01 PDT
Created attachment 528568 [details] [diff] [review]
patch
Comment 3 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2011-04-27 09:02:28 PDT
http://hg.mozilla.org/mozilla-central/rev/557466969ba2

Note You need to log in before you can comment on or make changes to this bug.