| Index: ipc/ipc_message_utils.h
|
| diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h
|
| index 69ea7cb6d8a08e68815c393fa099d60ce0e3bc62..7f0036876c96e98ba475baa684b2feda8922b20f 100644
|
| --- a/ipc/ipc_message_utils.h
|
| +++ b/ipc/ipc_message_utils.h
|
| @@ -192,7 +192,12 @@ template <>
|
| struct ParamTraits<long> {
|
| typedef long param_type;
|
| static void Write(Message* m, const param_type& p) {
|
| - m->WriteLongUsingDangerousNonPortableLessPersistableForm(p);
|
| + // To ensure compatibility between 32-bit and 64-bit processes, send as
|
| + // 64 bit size. We can't check on the writing side if reading may overflow
|
| + // if sending from 64-bit process and reading from 32-bit process, since we
|
| + // don't know if this IPC parameter is 64 bit always (i.e. from an int64_t
|
| + // typedef) or if it's from a size_t.
|
| + m->WriteLong(p);
|
| }
|
| static bool Read(const Message* m,
|
| base::PickleIterator* iter,
|
| @@ -206,7 +211,8 @@ template <>
|
| struct ParamTraits<unsigned long> {
|
| typedef unsigned long param_type;
|
| static void Write(Message* m, const param_type& p) {
|
| - m->WriteLongUsingDangerousNonPortableLessPersistableForm(p);
|
| + // See comment in ParamTraits<long>::Write.
|
| + m->WriteLong(p);
|
| }
|
| static bool Read(const Message* m,
|
| base::PickleIterator* iter,
|
|
|