Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: components/nacl/loader/nacl_ipc_adapter.cc

Issue 794683005: replace COMPILE_ASSERT with static_assert in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatting fixup Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/nacl/loader/nacl_ipc_adapter.cc
diff --git a/components/nacl/loader/nacl_ipc_adapter.cc b/components/nacl/loader/nacl_ipc_adapter.cc
index 571249a0cc00a7a76af5fd1ef7622f38d624dee7..6cf2cc3e9a1a88656c12051821c788f13f4611eb 100644
--- a/components/nacl/loader/nacl_ipc_adapter.cc
+++ b/components/nacl/loader/nacl_ipc_adapter.cc
@@ -386,8 +386,8 @@ int NaClIPCAdapter::Send(const NaClImcTypedMsgHdr* msg) {
// we know that data_len < max size (checked above) and our current
// accumulated value is also < max size, we just need to make sure that
// 2x max size can never overflow.
- COMPILE_ASSERT(IPC::Channel::kMaximumMessageSize < (UINT_MAX / 2),
- MaximumMessageSizeWillOverflow);
+ static_assert(IPC::Channel::kMaximumMessageSize < (UINT_MAX / 2),
+ "kMaximumMessageSize is too large, and may overflow");
size_t new_size = locked_data_.to_be_sent_.size() + input_data_len;
if (new_size > IPC::Channel::kMaximumMessageSize) {
ClearToBeSent();
« no previous file with comments | « components/history/core/android/android_history_types.cc ('k') | components/nacl/loader/nonsfi/nonsfi_sandbox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698