deathgrip chrome event handler in HandleDOMEvent. partial fix for bug 21397. r:hyatt a:chofmann

This commit is contained in:
danm%netscape.com 1999-12-14 02:28:16 +00:00
Родитель faf2c862f3
Коммит 51e7acaff7
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -2987,6 +2987,11 @@ GlobalWindowImpl::HandleDOMEvent(nsIPresContext* aPresContext,
nsresult ret = NS_OK;
nsIDOMEvent* domEvent = nsnull;
/* mChromeEventHandler goes dangling in the middle of this
function under some circumstances (events that destroy
the window) without this addref. */
nsCOMPtr<nsIChromeEventHandler> kungFuDeathGrip(mChromeEventHandler);
if (NS_EVENT_FLAG_INIT == aFlags) {
aDOMEvent = &domEvent;
aEvent->flags = NS_EVENT_FLAG_NONE;