Commit 75935f9b authored by Chase Phillips's avatar Chase Phillips Committed by Commit Bot

Mojo: Change CHECK() on message length to CHECK_LT()

Crash reports from users indicate we sometimes try to send messages
that are too large.  We have code to keep this from happening, but
the code is brittle and apparently some cases can get through.

It would help to know what the relative values are to understand how
our estimates are failing, so change this from CHECK() to CHECK_LT().

Bug: 717812
Bug: 901269
Change-Id: Ic511dae1ea5d96dcb9937fff1207976a40a903f2
Reviewed-on: https://chromium-review.googlesource.com/c/1324091Reviewed-by: default avatarKen Rockot <rockot@google.com>
Commit-Queue: Chase Phillips <cmp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606158}
parent 67549b5d
......@@ -718,7 +718,7 @@ void NodeChannel::WriteChannelMessage(Channel::MessagePtr message) {
// maximum allowed size. This is more useful than killing a Channel when we
// *receive* an oversized message, as we should consider oversized message
// transmission to be a bug and this helps easily identify offending code.
CHECK(message->data_num_bytes() < GetConfiguration().max_message_num_bytes);
CHECK_LT(message->data_num_bytes(), GetConfiguration().max_message_num_bytes);
base::AutoLock lock(channel_lock_);
if (!channel_)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment