Bug 1249915 - Fix missing MOZ_COUNT_CTOR and some misc cleanup. r=karlt
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 23 Feb 2016 10:17:46 -0500
changeset 285189 1d17e93e228fb1ab56023b1ba3748f724b668e7c
parent 285188 31aa0286d4e7eb97aef435ec122181f9b6841b2d
child 285190 28c2483afa0d8d6af7a072b71030e32130744c92
push idunknown
push userunknown
push dateunknown
reviewerskarlt
bugs1249915
milestone47.0a1
Bug 1249915 - Fix missing MOZ_COUNT_CTOR and some misc cleanup. r=karlt MozReview-Commit-ID: 3nB4awYSXCk
widget/TouchEvents.h
--- a/widget/TouchEvents.h
+++ b/widget/TouchEvents.h
@@ -78,17 +78,17 @@ public:
     AssignGUIEventData(aEvent, aCopyTargets);
 
     panDirection = aEvent.panDirection;
     displayPanFeedback = aEvent.displayPanFeedback;
   }
 };
 
 /******************************************************************************
- * mozilla::WidgetTouchEvent
+ * mozilla::WidgetSimpleGestureEvent
  ******************************************************************************/
 
 class WidgetSimpleGestureEvent : public WidgetMouseEventBase
 {
 public:
   virtual WidgetSimpleGestureEvent* AsSimpleGestureEvent() override
   {
     return this;
@@ -158,29 +158,30 @@ class WidgetTouchEvent : public WidgetIn
 public:
   typedef nsTArray<RefPtr<mozilla::dom::Touch>> TouchArray;
   typedef AutoTArray<RefPtr<mozilla::dom::Touch>, 10> AutoTouchArray;
 
   virtual WidgetTouchEvent* AsTouchEvent() override { return this; }
 
   WidgetTouchEvent()
   {
+    MOZ_COUNT_CTOR(WidgetTouchEvent);
   }
 
   WidgetTouchEvent(const WidgetTouchEvent& aOther)
     : WidgetInputEvent(aOther.mFlags.mIsTrusted, aOther.mMessage, aOther.widget,
                        eTouchEventClass)
   {
+    MOZ_COUNT_CTOR(WidgetTouchEvent);
     modifiers = aOther.modifiers;
     time = aOther.time;
     timeStamp = aOther.timeStamp;
     touches.AppendElements(aOther.touches);
     mFlags.mCancelable = mMessage != eTouchCancel;
     mFlags.mHandledByAPZ = aOther.mFlags.mHandledByAPZ;
-    MOZ_COUNT_CTOR(WidgetTouchEvent);
   }
 
   WidgetTouchEvent(bool aIsTrusted, EventMessage aMessage, nsIWidget* aWidget)
     : WidgetInputEvent(aIsTrusted, aMessage, aWidget, eTouchEventClass)
   {
     MOZ_COUNT_CTOR(WidgetTouchEvent);
     mFlags.mCancelable = mMessage != eTouchCancel;
   }