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

patch (1.97 KB, patch)
2011-04-26 14:38 PDT, Olli Pettay [:smaug]
no flags Details | Diff | Splinter Review
patch (2.62 KB, patch)
2011-04-27 05:04 PDT, Olli Pettay [:smaug]
peterv: review+
Details | Diff | Splinter Review

Description Olli Pettay [:smaug] 2011-04-26 14:38:53 PDT
Created attachment 528442 [details] [diff] [review]

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]

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] 2011-04-27 05:04:01 PDT
Created attachment 528568 [details] [diff] [review]
Comment 3 Olli Pettay [:smaug] 2011-04-27 09:02:28 PDT

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