Chromium Code Reviews| Index: chrome/browser/extensions/api/messaging/native_message_process_host.cc |
| diff --git a/chrome/browser/extensions/api/messaging/native_message_process_host.cc b/chrome/browser/extensions/api/messaging/native_message_process_host.cc |
| index c28b233dea7333b39a2e885cab378926a1657e05..7f455c93e50aa88bc1c3b7dac9bc23c9944ae4a0 100644 |
| --- a/chrome/browser/extensions/api/messaging/native_message_process_host.cc |
| +++ b/chrome/browser/extensions/api/messaging/native_message_process_host.cc |
| @@ -153,7 +153,8 @@ void NativeMessageProcessHost::OnMessage(const std::string& json) { |
| new net::IOBufferWithSize(json.size() + kMessageHeaderSize); |
| // Copy size and content of the message to the buffer. |
| - COMPILE_ASSERT(sizeof(uint32) == kMessageHeaderSize, incorrect_header_size); |
| + static_assert(sizeof(uint32) == kMessageHeaderSize, |
| + "kMessageHeaderSize must be 32 bits"); |
|
Nico
2014/12/23 01:32:12
I'd just say "…is incorrect", as is it repeats the
Mostyn Bramley-Moore
2014/12/23 08:16:37
Done.
|
| *reinterpret_cast<uint32*>(buffer->data()) = json.size(); |
| memcpy(buffer->data() + kMessageHeaderSize, json.data(), json.size()); |