Index: chrome/common/ipc_message_utils.h |
diff --git a/chrome/common/ipc_message_utils.h b/chrome/common/ipc_message_utils.h |
index 39bb2313d18700d0e92f7c0a7e1481e9174416ee..e7cf083baa338dd0071f42b7fed00bc0de944a6e 100644 |
--- a/chrome/common/ipc_message_utils.h |
+++ b/chrome/common/ipc_message_utils.h |
@@ -208,6 +208,25 @@ struct ParamTraits<uint64> { |
} |
}; |
+#if !defined(OS_WIN) |
+// TODO(port): why do we need this? |
+template <> |
+struct ParamTraits<void*> { |
+ typedef void* param_type; |
+ static void Write(Message* m, const param_type& p) { |
+ COMPILE_ASSERT(sizeof(long) == sizeof(void*), |
+ assumes_pointers_and_longs_same_size); |
+ m->WriteLong(bit_cast<long>(p)); |
+ } |
+ static bool Read(const Message* m, void** iter, param_type* r) { |
+ return m->ReadLong(iter, reinterpret_cast<long*>(r)); |
+ } |
+ static void Log(const param_type& p, std::wstring* l) { |
+ l->append(StringPrintf(L"%x", p)); |
+ } |
+}; |
+#endif |
+ |
template <> |
struct ParamTraits<double> { |
typedef double param_type; |