Commit 58d70a07 authored by Yutaka Hirano's avatar Yutaka Hirano Committed by Commit Bot

[WebSocket] Add CHECKs to investigate crash

Bug: 994000
Change-Id: Id92f66c7e0ac4fb3eeabfbb5b209080d450561bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1760643Reviewed-by: default avatarAdam Rice <ricea@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#688405}
parent 71833f42
......@@ -688,7 +688,11 @@ ChannelState WebSocketChannel::OnWriteDone(bool synchronous, int result) {
}
ChannelState WebSocketChannel::ReadFrames() {
// TODO(crbug.com/994000) Remove this CHECK.
CHECK(stream_);
while (current_receive_quota_ > 0) {
// TODO(crbug.com/994000) Remove this CHECK.
CHECK(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.
......@@ -703,6 +707,8 @@ 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;
}
......
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