mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 18:08:58 +00:00
Make sure to null out mRootContent in Destroy when we unbind it. Bug 326645, r+sr+branch181=sicking
This commit is contained in:
parent
d82cef21db
commit
642b358e3a
@ -4759,7 +4759,17 @@ nsDocument::Destroy()
|
||||
mIsGoingAway = PR_TRUE;
|
||||
DestroyLinkMap();
|
||||
for (PRInt32 indx = 0; indx < count; ++indx) {
|
||||
mChildren.ChildAt(indx)->UnbindFromTree();
|
||||
nsIContent* content = mChildren.ChildAt(indx);
|
||||
if (content == mRootContent) {
|
||||
// Null out mRootContent first; this is similar to what RemoveChildAt()
|
||||
// does.
|
||||
mRootContent = nsnull;
|
||||
}
|
||||
|
||||
// XXXbz what about document observer notifications? We really need to get
|
||||
// rid of this Destroy() method!
|
||||
|
||||
content->UnbindFromTree();
|
||||
}
|
||||
|
||||
// Propagate the out-of-band notification to each PresShell's anonymous
|
||||
|
Loading…
Reference in New Issue
Block a user