Closed
Bug 523082
Opened 15 years ago
Closed 14 years ago
nsXULTemplateBuilder should unlink more
Categories
(Core :: XUL, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: smaug, Assigned: smaug)
References
Details
Attachments
(2 files, 1 obsolete file)
8.13 KB,
patch
|
peterv
:
review+
|
Details | Diff | Splinter Review |
8.21 KB,
patch
|
dbaron
:
approval2.0+
|
Details | Diff | Splinter Review |
Split from bug 335998.
Attachment #406999 -
Flags: review?(peterv)
Comment 1•15 years ago
|
||
Comment on attachment 406999 [details] [diff] [review] patch >diff --git a/content/xul/templates/src/nsXULTemplateBuilder.cpp b/content/xul/templates/src/nsXULTemplateBuilder.cpp >+ tmp->mMatchMap.EnumerateRead(DestroyMatchList, &(tmp->mPool)); >+ tmp->mMatchMap.Clear(); Can we make DestroyMatchList return PL_DHASH_REMOVE instead of making every caller call Clear and effectively enumerating twice? >diff --git a/content/xul/templates/src/nsXULTemplateQueryProcessorXML.cpp b/content/xul/templates/src/nsXULTemplateQueryProcessorXML.cpp > NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mTemplateBuilder) > NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mRequest) >+ NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mRoot) >+ NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mEvaluator) Maybe use the same order that these are declared in. Looks like we also need to hook up nsXMLBindingSet and nsXMLBinding, and mRuleToBindingsMap (both keys and values).
Updated•15 years ago
|
Attachment #406999 -
Flags: review?(peterv) → review-
Assignee | ||
Comment 2•14 years ago
|
||
Comment on attachment 406999 [details] [diff] [review] patch New patch coming
Attachment #406999 -
Attachment is obsolete: true
Assignee | ||
Comment 3•14 years ago
|
||
Unlink even more. I took the nsDocument.cpp part from Bug 335998. I could file a new bug for that if really needed.
Attachment #438744 -
Flags: review?(peterv)
Assignee | ||
Comment 4•14 years ago
|
||
I posted the patch to tryserver, though I did run template tests locally.
Comment 5•14 years ago
|
||
Comment on attachment 438744 [details] [diff] [review] patch >diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp >+ if (tmp->mBoxObjectTable) { >+ tmp->mBoxObjectTable->EnumerateRead(ClearAllBoxObjects, nsnull); >+ delete tmp->mBoxObjectTable; >+ tmp->mBoxObjectTable = nsnull; >+ } My worry here was/is that maybe something needs their boxobject when they are unlinked or being destroyed from unlinking. >diff --git a/content/xul/templates/src/nsXULTemplateQueryProcessorXML.cpp b/content/xul/templates/src/nsXULTemplateQueryProcessorXML.cpp >+TraverseRuleToBindingsMap(nsISupports* aKey, nsXMLBindingSet* aMatch, void* aContext) >+ cb->NoteXPCOMChild(aKey); >+ cb->NoteNativeChild(aMatch, &NS_CYCLE_COLLECTION_NAME(nsXMLBindingSet)); Please add NS_CYCLE_COLLECTION_NOTE_EDGE_NAME for both.
Attachment #438744 -
Flags: review?(peterv) → review+
Assignee | ||
Comment 6•14 years ago
|
||
I need to remember to land this
Assignee | ||
Comment 7•14 years ago
|
||
Attachment #463259 -
Flags: approval2.0?
Attachment #463259 -
Flags: approval2.0? → approval2.0+
Assignee | ||
Comment 8•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/b99eafbd3644
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•