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

Unified Diff: net/websockets/websocket_basic_stream.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 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: net/websockets/websocket_basic_stream.cc
diff --git a/net/websockets/websocket_basic_stream.cc b/net/websockets/websocket_basic_stream.cc
index e13e1eb7a9724370a9cd803abb536e84d93ff3f8..4ae9e25ca3991919ca3d22f99bb6801601025e66 100644
--- a/net/websockets/websocket_basic_stream.cc
+++ b/net/websockets/websocket_basic_stream.cc
@@ -57,8 +57,8 @@ int CalculateSerializedSizeAndTurnOnMaskBit(
// to cache anywhere near 2GB of frames.
uint64_t frame_size = frame->header.payload_length +
GetWebSocketFrameHeaderSize(frame->header);
- CHECK_LE(frame_size, kMaximumTotalSize - total_size)
- << "Aborting to prevent overflow";
+ // Aborting to prevent overflow
+ CHECK_LE(frame_size, kMaximumTotalSize - total_size);
total_size += frame_size;
}
return static_cast<int>(total_size);
@@ -153,7 +153,8 @@ int WebSocketBasicStream::WriteFrames(
DCHECK_NE(ERR_INVALID_ARGUMENT, result)
<< "WriteWebSocketFrameHeader() says that " << remaining_size
<< " is not enough to write the header in. This should not happen.";
- CHECK_GE(result, 0) << "Potentially security-critical check failed";
+ // Potentially security-critical check failed
+ CHECK_GE(result, 0);
dest += result;
remaining_size -= result;
@@ -399,9 +400,8 @@ void WebSocketBasicStream::AddToIncompleteControlFrameBody(
return;
const int new_offset =
incomplete_control_frame_body_->offset() + data_buffer->size();
- CHECK_GE(incomplete_control_frame_body_->capacity(), new_offset)
- << "Control frame body larger than frame header indicates; frame parser "
- "bug?";
+ // Control frame body larger than frame header indicates; frame parser bug?
+ CHECK_GE(incomplete_control_frame_body_->capacity(), new_offset);
memcpy(incomplete_control_frame_body_->data(),
data_buffer->data(),
data_buffer->size());

Powered by Google App Engine
This is Rietveld 408576698