Index: mojo/edk/system/channel.h |
diff --git a/mojo/edk/system/channel.h b/mojo/edk/system/channel.h |
index 9932c9c71fc0d1695dab89bc6d40491adb70a0a4..1d384a978b631b6bd61e44345f5d26c44f14b7e6 100644 |
--- a/mojo/edk/system/channel.h |
+++ b/mojo/edk/system/channel.h |
@@ -76,6 +76,13 @@ class Channel : public base::RefCountedThreadSafe<Channel> { |
}; |
static_assert(sizeof(MachPortsEntry) == 6, |
"sizeof(MachPortsEntry) must be 6 bytes"); |
+ |
+ struct MachPortsExtraHeader { |
+ uint16_t num_ports; |
+ MachPortsEntry entries[0]; |
+ }; |
+ static_assert(sizeof(MachPortsExtraHeader) == 2, |
+ "sizeof(MachPortsExtraHeader) must be 2 bytes"); |
#endif |
#pragma pack(pop) |
@@ -155,7 +162,7 @@ class Channel : public base::RefCountedThreadSafe<Channel> { |
#if defined(OS_MACOSX) && !defined(OS_IOS) |
// On OSX, handles are serialised into the extra header section. |
- MachPortsEntry* mach_ports_ = nullptr; |
+ MachPortsExtraHeader* mach_ports_header_ = nullptr; |
#endif |
DISALLOW_COPY_AND_ASSIGN(Message); |