temporary fix for reentrancy bug in HandleEvent

This commit is contained in:
rods%netscape.com 1999-07-28 21:42:37 +00:00
parent 5a5e4bee42
commit 6412a66059
2 changed files with 8 additions and 0 deletions

View File

@ -2241,8 +2241,12 @@ PresShell::HandleEvent(nsIView *aView,
else {
nsIContent* targetContent;
if (NS_OK == mCurrentEventFrame->GetContent(&targetContent) && nsnull != targetContent) {
// XXX Temporary fix for re-entracy isses
// temporarily cache the current frame
nsIFrame * currentEventFrame = mCurrentEventFrame;
rv = targetContent->HandleDOMEvent(*mPresContext, (nsEvent*)aEvent, nsnull,
NS_EVENT_FLAG_INIT, aEventStatus);
mCurrentEventFrame = currentEventFrame; // other part of re-entracy fix
NS_RELEASE(targetContent);
}
}

View File

@ -2241,8 +2241,12 @@ PresShell::HandleEvent(nsIView *aView,
else {
nsIContent* targetContent;
if (NS_OK == mCurrentEventFrame->GetContent(&targetContent) && nsnull != targetContent) {
// XXX Temporary fix for re-entracy isses
// temporarily cache the current frame
nsIFrame * currentEventFrame = mCurrentEventFrame;
rv = targetContent->HandleDOMEvent(*mPresContext, (nsEvent*)aEvent, nsnull,
NS_EVENT_FLAG_INIT, aEventStatus);
mCurrentEventFrame = currentEventFrame; // other part of re-entracy fix
NS_RELEASE(targetContent);
}
}