temporary fix for reentrancy bug in HandleEvent

git-svn-id: svn://10.0.0.236/trunk@41488 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rods%netscape.com 1999-07-28 21:42:37 +00:00
parent 4d6131b0ce
commit e2a7ed2062
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);
}
}