Bug 837561 ReadInt16 and WriteInt16 should be paired r=benjamin
authorGinn Chen <Ginn.Chen@Oracle.COM>
Mon, 18 Feb 2013 15:19:03 +0800
changeset 122212 11ca90723b3ab2e08a5cb68acbd75a4ea3f304a2
parent 122211 9e0279c63245a179ec1c3efd6b4fdb365b49c95a
child 122213 08fb57d88c011695df9e2eb5c35fc454767b2798
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersbenjamin
bugs837561
milestone21.0a1
Bug 837561 ReadInt16 and WriteInt16 should be paired r=benjamin
ipc/chromium/src/chrome/common/ipc_message_utils.h
--- a/ipc/chromium/src/chrome/common/ipc_message_utils.h
+++ b/ipc/chromium/src/chrome/common/ipc_message_utils.h
@@ -261,31 +261,31 @@ struct ParamTraitsFundamental<double> {
 
 template <class P>
 struct ParamTraitsFixed : ParamTraitsFundamental<P> {};
 
 template <>
 struct ParamTraitsFixed<int16_t> {
   typedef int16_t param_type;
   static void Write(Message* m, const param_type& p) {
-    m->WriteInt(p);
+    m->WriteInt16(p);
   }
   static bool Read(const Message* m, void** iter, param_type* r) {
     return m->ReadInt16(iter, r);
   }
   static void Log(const param_type& p, std::wstring* l) {
     l->append(StringPrintf(L"%hd", p));
   }
 };
 
 template <>
 struct ParamTraitsFixed<uint16_t> {
   typedef uint16_t param_type;
   static void Write(Message* m, const param_type& p) {
-    m->WriteInt(p);
+    m->WriteUInt16(p);
   }
   static bool Read(const Message* m, void** iter, param_type* r) {
     return m->ReadUInt16(iter, r);
   }
   static void Log(const param_type& p, std::wstring* l) {
     l->append(StringPrintf(L"%hu", p));
   }
 };