Bug 837561 ReadInt16 and WriteInt16 should be paired r=benjamin
--- 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));
}
};