nsEventChainVisitor
author Benjamin Smedberg <benjamin@smedbergs.us>
Sat, 26 Jul 2008 22:49:39 -0400
changeset 167 a4da40849f5436e629c5732f4368c6c48189637f
parent 68 49c5ee4b50b4e29f7da5e637a83b47436455034d
permissions -rw-r--r--
State as of now

diff --git a/content/events/public/nsEventDispatcher.h b/content/events/public/nsEventDispatcher.h
--- a/content/events/public/nsEventDispatcher.h
+++ b/content/events/public/nsEventDispatcher.h
@@ -76,8 +76,10 @@ public:
                       nsIDOMEvent* aDOMEvent,
                       nsEventStatus aEventStatus = nsEventStatus_eIgnore)
   : mPresContext(aPresContext), mEvent(aEvent), mDOMEvent(aDOMEvent),
-    mEventStatus(aEventStatus), mItemFlags(0)
-  {}
+    mEventStatus(aEventStatus), mItemFlags(0), mItemData(nsnull)
+  {
+    ASSERT_StackObject(this);
+  }
 
   /**
    * The prescontext, possibly nsnull.
@@ -121,7 +123,7 @@ public:
    *       It is up to the Pre/PostHandleEvent implementation to decide how to
    *       use this.
    */
-  nsCOMPtr<nsISupports> mItemData;
+  nsISupports* mItemData;
 };
 
 class nsEventChainPreVisitor : public nsEventChainVisitor {
@@ -132,7 +134,9 @@ public:
                          nsEventStatus aEventStatus = nsEventStatus_eIgnore)
   : nsEventChainVisitor(aPresContext, aEvent, aDOMEvent, aEventStatus),
     mCanHandle(PR_TRUE), mForceContentDispatch(PR_FALSE),
-    mRelatedTargetIsInAnon(PR_FALSE) {}
+    mRelatedTargetIsInAnon(PR_FALSE),
+    mParentTarget(nsnull),
+    mEventTargetAtParent(nsnull) {}
 
   void Reset() {
     mItemFlags = 0;
@@ -167,13 +171,13 @@ public:
   /**
    * Parent item in the event target chain.
    */
-  nsCOMPtr<nsISupports> mParentTarget;
+  nsISupports* mParentTarget;
 
   /**
    * If the event needs to be retargeted, this is the event target,
    * which should be used when the event is handled at mParentTarget.
    */
-  nsCOMPtr<nsISupports> mEventTargetAtParent;
+  nsISupports* mEventTargetAtParent;
 };
 
 class nsEventChainPostVisitor : public nsEventChainVisitor {