Commit 63b47546 authored by vitalybuka's avatar vitalybuka Committed by Commit bot

Replaced DCHECK with CHECK to detect invalid socket usage.

Issue like 121085 or 320427 could be caused by writing request on busy sockets.

BUG=121085

Review URL: https://codereview.chromium.org/603783002

Cr-Commit-Position: refs/heads/master@{#297195}
parent d79fcd2c
...@@ -230,7 +230,7 @@ int SocketLibevent::Read(IOBuffer* buf, ...@@ -230,7 +230,7 @@ int SocketLibevent::Read(IOBuffer* buf,
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(thread_checker_.CalledOnValidThread());
DCHECK_NE(kInvalidSocket, socket_fd_); DCHECK_NE(kInvalidSocket, socket_fd_);
DCHECK(!waiting_connect_); DCHECK(!waiting_connect_);
DCHECK(read_callback_.is_null()); CHECK(read_callback_.is_null());
// Synchronous operation not supported // Synchronous operation not supported
DCHECK(!callback.is_null()); DCHECK(!callback.is_null());
DCHECK_LT(0, buf_len); DCHECK_LT(0, buf_len);
...@@ -258,7 +258,7 @@ int SocketLibevent::Write(IOBuffer* buf, ...@@ -258,7 +258,7 @@ int SocketLibevent::Write(IOBuffer* buf,
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(thread_checker_.CalledOnValidThread());
DCHECK_NE(kInvalidSocket, socket_fd_); DCHECK_NE(kInvalidSocket, socket_fd_);
DCHECK(!waiting_connect_); DCHECK(!waiting_connect_);
DCHECK(write_callback_.is_null()); CHECK(write_callback_.is_null());
// Synchronous operation not supported // Synchronous operation not supported
DCHECK(!callback.is_null()); DCHECK(!callback.is_null());
DCHECK_LT(0, buf_len); DCHECK_LT(0, buf_len);
......
...@@ -492,7 +492,7 @@ int TCPSocketWin::Read(IOBuffer* buf, ...@@ -492,7 +492,7 @@ int TCPSocketWin::Read(IOBuffer* buf,
DCHECK(CalledOnValidThread()); DCHECK(CalledOnValidThread());
DCHECK_NE(socket_, INVALID_SOCKET); DCHECK_NE(socket_, INVALID_SOCKET);
DCHECK(!waiting_read_); DCHECK(!waiting_read_);
DCHECK(read_callback_.is_null()); CHECK(read_callback_.is_null());
DCHECK(!core_->read_iobuffer_); DCHECK(!core_->read_iobuffer_);
return DoRead(buf, buf_len, callback); return DoRead(buf, buf_len, callback);
...@@ -504,7 +504,7 @@ int TCPSocketWin::Write(IOBuffer* buf, ...@@ -504,7 +504,7 @@ int TCPSocketWin::Write(IOBuffer* buf,
DCHECK(CalledOnValidThread()); DCHECK(CalledOnValidThread());
DCHECK_NE(socket_, INVALID_SOCKET); DCHECK_NE(socket_, INVALID_SOCKET);
DCHECK(!waiting_write_); DCHECK(!waiting_write_);
DCHECK(write_callback_.is_null()); CHECK(write_callback_.is_null());
DCHECK_GT(buf_len, 0); DCHECK_GT(buf_len, 0);
DCHECK(!core_->write_iobuffer_); DCHECK(!core_->write_iobuffer_);
......
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