Commit d9331731 authored by Yutaka Hirano's avatar Yutaka Hirano Committed by Commit Bot

Fix crash in WebSocketChannel::ReadFrames

RespondToClosingHandshake can fail, and in that case we must stop using
the net::WebSocketChannel instance.

Bug: 994000
Change-Id: Ibaba2c552cfba59c3d95f63f0d9e807df4c4f564
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1830492
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: default avatarAdam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#701047}
parent c16f7976
......@@ -594,7 +594,9 @@ ChannelState WebSocketChannel::ReadFrames() {
DCHECK(!event_interface_->HasPendingDataFrames());
// We've been waiting for the client to consume the frames before
// responding to the closing handshake initiated by the server.
ignore_result(RespondToClosingHandshake());
if (RespondToClosingHandshake() == CHANNEL_DELETED) {
return CHANNEL_DELETED;
}
}
// TODO(crbug.com/999235): Remove this CHECK.
......
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