Bug 351879, crash calling refresh() during a refresh, r=aaronr+doronr

This commit is contained in:
Olli.Pettay%helsinki.fi 2006-09-18 17:44:00 +00:00
Родитель 97dc149f88
Коммит c8ed206dcd
1 изменённых файлов: 9 добавлений и 11 удалений

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

@ -571,19 +571,17 @@ nsPostRefresh::~nsPostRefresh()
// container->refresh below could ask for ContainerNeedsPostRefresh which
// will add an item to the sContainerPostRefreshList if sRefreshing > 0.
// So keeping this under sRefreshing-- will avoid an infinite loop.
if (sContainerPostRefreshList) {
while (sContainerPostRefreshList->Count()) {
PRInt32 last = sContainerPostRefreshList->Count() - 1;
nsIXFormsControl* container =
NS_STATIC_CAST(nsIXFormsControl*, sContainerPostRefreshList->ElementAt(last));
sContainerPostRefreshList->RemoveElementAt(last);
if (container) {
container->Refresh();
}
while (sContainerPostRefreshList && sContainerPostRefreshList->Count()) {
PRInt32 last = sContainerPostRefreshList->Count() - 1;
nsIXFormsControl* container =
NS_STATIC_CAST(nsIXFormsControl*, sContainerPostRefreshList->ElementAt(last));
sContainerPostRefreshList->RemoveElementAt(last);
if (container) {
container->Refresh();
}
delete sContainerPostRefreshList;
sContainerPostRefreshList = nsnull;
}
delete sContainerPostRefreshList;
sContainerPostRefreshList = nsnull;
}
const nsVoidArray*