Delete mNext iteratively to avoid blowing up the stack. b=460461 r+sr=dbaron

This commit is contained in:
Mats Palmgren 2008-11-02 17:05:14 +01:00
parent 92bdda65fa
commit ada556a4e8

View File

@ -202,7 +202,15 @@ public:
NS_HIDDEN ~UndisplayedNode()
{
MOZ_COUNT_DTOR(UndisplayedNode);
delete mNext;
// Delete mNext iteratively to avoid blowing up the stack (bug 460461).
UndisplayedNode *cur = mNext;
while (cur) {
UndisplayedNode *next = cur->mNext;
cur->mNext = nsnull;
delete cur;
cur = next;
}
}
nsCOMPtr<nsIContent> mContent;