diff options
author | edcourtney <edcourtney@chromium.org> | 2016-01-11 02:20:24 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-11 10:21:34 +0000 |
commit | 90785c757f79304c923aaba17694b7ce4ed1b91b (patch) | |
tree | d1f8f3d067b922ae462bce4510bc5aa9515d3161 /mojo | |
parent | e7fc592f19c6ffde1296ff01482013a0dd68a977 (diff) | |
download | chromium_src-90785c757f79304c923aaba17694b7ce4ed1b91b.zip chromium_src-90785c757f79304c923aaba17694b7ce4ed1b91b.tar.gz chromium_src-90785c757f79304c923aaba17694b7ce4ed1b91b.tar.bz2 |
[mojo] Pack broker message structs, and make sure enum values are always 4 bytes.
BUG=
Review URL: https://codereview.chromium.org/1568773002
Cr-Commit-Position: refs/heads/master@{#368555}
Diffstat (limited to 'mojo')
-rw-r--r-- | mojo/edk/system/broker_messages.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mojo/edk/system/broker_messages.h b/mojo/edk/system/broker_messages.h index 13fe980..939444b 100644 --- a/mojo/edk/system/broker_messages.h +++ b/mojo/edk/system/broker_messages.h @@ -13,6 +13,9 @@ namespace mojo { namespace edk { +// Pack all structs here. +#pragma pack(push, 1) + // This header defines the message format between ChildBroker and // ChildBrokerHost. @@ -20,7 +23,7 @@ namespace edk { // Windows only messages needed because sandboxed child processes need the // parent's help. They are sent synchronously from child to parent and each have // a response. They are sent over a raw pipe. -enum WindowsSandboxMessages { +enum WindowsSandboxMessages : uint32_t { // The reply is two HANDLEs. CREATE_PLATFORM_CHANNEL_PAIR = 0, // The reply is tokens of the same count of passed in handles. @@ -51,7 +54,7 @@ const uint64_t kBrokerRouteId = 1; // Multiplexing related messages. They are all asynchronous messages. // They are sent over RawChannel. -enum MultiplexMessages { +enum MultiplexMessages : uint32_t { // Messages from child to parent. // Tells the parent that the given pipe id has been bound to a @@ -103,6 +106,8 @@ struct PeerDiedMessage { uint64_t pipe_id; }; +#pragma pack(pop) + } // namespace edk } // namespace mojo |