Bug 1405669 - [Pointer Event] Avoid creating temporarily variable when serializing WidgetPointerHelper. r?masayuki draft
authorStone Shih <sshih@mozilla.com>
Thu, 21 Sep 2017 16:17:30 +0800
changeset 675478 0d7528292108b90540af023cae3a6a58e0aab26c
parent 675302 aa40f93369300af2aed79741293511c0263a8f33
child 734598 994b00d6517df8b5eea90d786922a70993a59d9f
push id83126
push usersshih@mozilla.com
push dateThu, 05 Oct 2017 09:09:57 +0000
reviewersmasayuki
bugs1405669
milestone58.0a1
Bug 1405669 - [Pointer Event] Avoid creating temporarily variable when serializing WidgetPointerHelper. r?masayuki MozReview-Commit-ID: 6PdO2RjUXWN
widget/nsGUIEventIPC.h
--- a/widget/nsGUIEventIPC.h
+++ b/widget/nsGUIEventIPC.h
@@ -260,17 +260,17 @@ struct ParamTraits<mozilla::WidgetPointe
 template<>
 struct ParamTraits<mozilla::WidgetMouseEvent>
 {
   typedef mozilla::WidgetMouseEvent paramType;
 
   static void Write(Message* aMsg, const paramType& aParam)
   {
     WriteParam(aMsg, static_cast<const mozilla::WidgetMouseEventBase&>(aParam));
-    WriteParam(aMsg, static_cast<mozilla::WidgetPointerHelper>(aParam));
+    WriteParam(aMsg, static_cast<const mozilla::WidgetPointerHelper&>(aParam));
     WriteParam(aMsg, aParam.mIgnoreRootScrollFrame);
     WriteParam(aMsg, static_cast<paramType::ReasonType>(aParam.mReason));
     WriteParam(aMsg, static_cast<paramType::ContextMenuTriggerType>(
                        aParam.mContextMenuTrigger));
     WriteParam(aMsg, static_cast<paramType::ExitFromType>(aParam.mExitFrom));
     WriteParam(aMsg, aParam.mClickCount);
   }