Skip to content

Commit

Permalink
[WebSocket] Remove CHECKs needed for crash investigation
Browse files Browse the repository at this point in the history
Turn some into DCHECK, and remove others.

Bug: 994000
Change-Id: Ic45693dd2ac1f50833a3aacd454479b2ba9083b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1775678
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691461}
  • Loading branch information
yutakahirano authored and Commit Bot committed Aug 29, 2019
1 parent e25708f commit 8fa3284
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions net/websockets/websocket_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,7 @@ ChannelState WebSocketChannel::OnWriteDone(bool synchronous, int result) {
}

ChannelState WebSocketChannel::ReadFrames() {
// TODO(crbug.com/994000) Remove this CHECK.
CHECK(stream_);
DCHECK(stream_);
DCHECK(state_ == CONNECTED || state_ == SEND_CLOSED || state_ == CLOSE_WAIT);
DCHECK(read_frames_.empty());
if (is_reading_) {
Expand All @@ -648,8 +647,7 @@ ChannelState WebSocketChannel::ReadFrames() {
}

while (!event_interface_->HasPendingDataFrames()) {
// TODO(crbug.com/994000) Remove this CHECK.
CHECK(stream_);
DCHECK(stream_);
// This use of base::Unretained is safe because this object owns the
// WebSocketStream, and any pending reads will be cancelled when it is
// destroyed.
Expand All @@ -665,8 +663,6 @@ ChannelState WebSocketChannel::ReadFrames() {
return CHANNEL_DELETED;
}
DCHECK_NE(CLOSED, state_);
// TODO(crbug.com/994000) Remove this CHECK.
CHECK_EQ(result, net::OK);
}
return CHANNEL_ALIVE;
}
Expand Down

0 comments on commit 8fa3284

Please sign in to comment.