Add two checks to help debug crash on iOS.
Bug: 1335423 Change-Id: Iba915ca20870e7d27505e6b4a758404c51fba1d7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3698876 Reviewed-by: David Schinazi <dschinazi@chromium.org> Commit-Queue: Bence Béky <bnc@chromium.org> Cr-Commit-Position: refs/heads/main@{#1013640}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
3a358827ce
commit
707a5224e6
@@ -1281,7 +1281,9 @@ int HttpNetworkTransaction::DoReadHeadersComplete(int result) {
|
|||||||
|
|
||||||
int HttpNetworkTransaction::DoReadBody() {
|
int HttpNetworkTransaction::DoReadBody() {
|
||||||
DCHECK(read_buf_.get());
|
DCHECK(read_buf_.get());
|
||||||
DCHECK_GT(read_buf_len_, 0);
|
// TODO(https://crbug.com/1335423): Change to DCHECK_GT() or remove after bug
|
||||||
|
// is fixed.
|
||||||
|
CHECK_GT(read_buf_len_, 0);
|
||||||
DCHECK(stream_ != nullptr);
|
DCHECK(stream_ != nullptr);
|
||||||
|
|
||||||
next_state_ = STATE_READ_BODY_COMPLETE;
|
next_state_ = STATE_READ_BODY_COMPLETE;
|
||||||
|
@@ -665,6 +665,10 @@ void QuicChromiumClientStream::OnError(int error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int QuicChromiumClientStream::Read(IOBuffer* buf, int buf_len) {
|
int QuicChromiumClientStream::Read(IOBuffer* buf, int buf_len) {
|
||||||
|
// TODO(https://crbug.com/1335423): Change to DCHECK_GT() or remove after bug
|
||||||
|
// is fixed.
|
||||||
|
CHECK_GT(buf_len, 0);
|
||||||
|
|
||||||
if (IsDoneReading())
|
if (IsDoneReading())
|
||||||
return 0; // EOF
|
return 0; // EOF
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user