Assert if someone calls frame->SetNextSibling(frame), since that creates a

looped linked list.  Bug 266332, patch by timeless, r+sr=bzbarsky
This commit is contained in:
bzbarsky%mit.edu 2004-10-30 18:37:35 +00:00
Родитель d2dc4d365b
Коммит 9854e1bfb4
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -695,7 +695,10 @@ public:
* Child frames are linked together in a singly-linked list
*/
nsIFrame* GetNextSibling() const { return mNextSibling; }
void SetNextSibling(nsIFrame* aNextSibling) { mNextSibling = aNextSibling; }
void SetNextSibling(nsIFrame* aNextSibling) {
NS_ASSERTION(this != aNextSibling, "Creating a circular frame list, this is very bad.");
mNextSibling = aNextSibling;
}
/**
* Paint is responsible for painting the frame. The aWhichLayer

Просмотреть файл

@ -695,7 +695,10 @@ public:
* Child frames are linked together in a singly-linked list
*/
nsIFrame* GetNextSibling() const { return mNextSibling; }
void SetNextSibling(nsIFrame* aNextSibling) { mNextSibling = aNextSibling; }
void SetNextSibling(nsIFrame* aNextSibling) {
NS_ASSERTION(this != aNextSibling, "Creating a circular frame list, this is very bad.");
mNextSibling = aNextSibling;
}
/**
* Paint is responsible for painting the frame. The aWhichLayer