fix for 67006, patch from MarkH@ActiveState.com, r=dr, sr=hyatt

git-svn-id: svn://10.0.0.236/trunk@90295 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dr%netscape.com
2001-03-24 00:14:10 +00:00
parent 4737ba6953
commit db17cb7cb9

View File

@@ -408,6 +408,11 @@ nsWebShellWindow::HandleEvent(nsGUIEvent *aEvent)
break;
}
case NS_XUL_CLOSE: {
// Calling ExecuteCloseHandler may actually close the window
// (it probably shouldn't, but you never know what the users JS
// code will do). Therefore we add a death-grip to the window
// for the duration of the close handler.
nsCOMPtr<nsIWebShellWindow> kungFuDeathGrip(eventWindow);
if (!eventWindow->ExecuteCloseHandler())
eventWindow->Close();
break;