From 90b94622e392e752934ebbf783dc3a7a6ced8bc6 Mon Sep 17 00:00:00 2001 From: "joki%netscape.com" Date: Sun, 2 Aug 1998 04:15:08 +0000 Subject: [PATCH] Fix bug 311157, mouseover crashes release builds. --- content/base/src/nsDocument.cpp | 3 ++- dom/src/base/nsGlobalWindow.cpp | 3 ++- layout/base/src/nsDocument.cpp | 3 ++- layout/html/base/src/nsHTMLContent.cpp | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index 240594ab122..eeed58a6311 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -845,6 +845,7 @@ nsresult nsDocument::HandleDOMEvent(nsIPresContext& aPresContext, nsEventStatus& aEventStatus) { nsresult mRet = NS_OK; + nsIDOMEvent* mDOMEvent = nsnull; if (DOM_EVENT_INIT == aFlags) { nsIEventStateManager *mManager; @@ -853,7 +854,6 @@ nsresult nsDocument::HandleDOMEvent(nsIPresContext& aPresContext, NS_RELEASE(mManager); } - nsIDOMEvent* mDOMEvent = nsnull; aDOMEvent = &mDOMEvent; } @@ -888,6 +888,7 @@ nsresult nsDocument::HandleDOMEvent(nsIPresContext& aPresContext, } } } + aDOMEvent = nsnull; } return mRet; diff --git a/dom/src/base/nsGlobalWindow.cpp b/dom/src/base/nsGlobalWindow.cpp index 599041df2ca..035d2cabce3 100644 --- a/dom/src/base/nsGlobalWindow.cpp +++ b/dom/src/base/nsGlobalWindow.cpp @@ -822,6 +822,7 @@ nsresult GlobalWindowImpl::HandleDOMEvent(nsIPresContext& aPresContext, nsEventStatus& aEventStatus) { nsresult mRet = NS_OK; + nsIDOMEvent* mDOMEvent = nsnull; if (DOM_EVENT_INIT == aFlags) { nsIEventStateManager *mManager; @@ -830,7 +831,6 @@ nsresult GlobalWindowImpl::HandleDOMEvent(nsIPresContext& aPresContext, NS_RELEASE(mManager); } - nsIDOMEvent* mDOMEvent = nsnull; aDOMEvent = &mDOMEvent; } @@ -857,6 +857,7 @@ nsresult GlobalWindowImpl::HandleDOMEvent(nsIPresContext& aPresContext, } } } + aDOMEvent = nsnull; } return mRet; diff --git a/layout/base/src/nsDocument.cpp b/layout/base/src/nsDocument.cpp index 240594ab122..eeed58a6311 100644 --- a/layout/base/src/nsDocument.cpp +++ b/layout/base/src/nsDocument.cpp @@ -845,6 +845,7 @@ nsresult nsDocument::HandleDOMEvent(nsIPresContext& aPresContext, nsEventStatus& aEventStatus) { nsresult mRet = NS_OK; + nsIDOMEvent* mDOMEvent = nsnull; if (DOM_EVENT_INIT == aFlags) { nsIEventStateManager *mManager; @@ -853,7 +854,6 @@ nsresult nsDocument::HandleDOMEvent(nsIPresContext& aPresContext, NS_RELEASE(mManager); } - nsIDOMEvent* mDOMEvent = nsnull; aDOMEvent = &mDOMEvent; } @@ -888,6 +888,7 @@ nsresult nsDocument::HandleDOMEvent(nsIPresContext& aPresContext, } } } + aDOMEvent = nsnull; } return mRet; diff --git a/layout/html/base/src/nsHTMLContent.cpp b/layout/html/base/src/nsHTMLContent.cpp index b7cef9104c3..0b273c6398b 100644 --- a/layout/html/base/src/nsHTMLContent.cpp +++ b/layout/html/base/src/nsHTMLContent.cpp @@ -627,6 +627,7 @@ nsresult nsHTMLContent::HandleDOMEvent(nsIPresContext& aPresContext, nsEventStatus& aEventStatus) { nsresult mRet = NS_OK; + nsIDOMEvent* mDOMEvent = nsnull; if (DOM_EVENT_INIT == aFlags) { nsIEventStateManager *mManager; @@ -635,7 +636,6 @@ nsresult nsHTMLContent::HandleDOMEvent(nsIPresContext& aPresContext, NS_RELEASE(mManager); } - nsIDOMEvent* mDOMEvent = nsnull; aDOMEvent = &mDOMEvent; } @@ -664,6 +664,7 @@ nsresult nsHTMLContent::HandleDOMEvent(nsIPresContext& aPresContext, } } } + aDOMEvent = nsnull; } return mRet;