Fix bug 6258, release of null content pointer due to reentrant event

This commit is contained in:
joki%netscape.com 1999-09-21 19:00:55 +00:00
Родитель 613a248dab
Коммит c681d323f9
2 изменённых файлов: 4 добавлений и 4 удалений

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

@ -1394,7 +1394,7 @@ nsEventStateManager::SendFocusBlur(nsIContent *aContent)
mCurrentFocus->HandleDOMEvent(*mPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, status);
}
NS_RELEASE(mCurrentTargetContent);
NS_IF_RELEASE(mCurrentTargetContent);
}
if (nsnull != aContent) {
@ -1411,7 +1411,7 @@ nsEventStateManager::SendFocusBlur(nsIContent *aContent)
aContent->HandleDOMEvent(*mPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, status);
}
NS_RELEASE(mCurrentTargetContent);
NS_IF_RELEASE(mCurrentTargetContent);
//reset mCurretTargetContent to what it was
mCurrentTargetContent = targetBeforeEvent;

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

@ -1394,7 +1394,7 @@ nsEventStateManager::SendFocusBlur(nsIContent *aContent)
mCurrentFocus->HandleDOMEvent(*mPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, status);
}
NS_RELEASE(mCurrentTargetContent);
NS_IF_RELEASE(mCurrentTargetContent);
}
if (nsnull != aContent) {
@ -1411,7 +1411,7 @@ nsEventStateManager::SendFocusBlur(nsIContent *aContent)
aContent->HandleDOMEvent(*mPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, status);
}
NS_RELEASE(mCurrentTargetContent);
NS_IF_RELEASE(mCurrentTargetContent);
//reset mCurretTargetContent to what it was
mCurrentTargetContent = targetBeforeEvent;