From 63b47546afb414f9e62a9a64518a92c5aeb0ce63 Mon Sep 17 00:00:00 2001 From: vitalybuka Date: Mon, 29 Sep 2014 10:14:19 -0700 Subject: 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} --- net/socket/socket_libevent.cc | 4 ++-- net/socket/tcp_socket_win.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'net') diff --git a/net/socket/socket_libevent.cc b/net/socket/socket_libevent.cc index cd40e49..5f16c92 100644 --- a/net/socket/socket_libevent.cc +++ b/net/socket/socket_libevent.cc @@ -230,7 +230,7 @@ int SocketLibevent::Read(IOBuffer* buf, DCHECK(thread_checker_.CalledOnValidThread()); DCHECK_NE(kInvalidSocket, socket_fd_); DCHECK(!waiting_connect_); - DCHECK(read_callback_.is_null()); + CHECK(read_callback_.is_null()); // Synchronous operation not supported DCHECK(!callback.is_null()); DCHECK_LT(0, buf_len); @@ -258,7 +258,7 @@ int SocketLibevent::Write(IOBuffer* buf, DCHECK(thread_checker_.CalledOnValidThread()); DCHECK_NE(kInvalidSocket, socket_fd_); DCHECK(!waiting_connect_); - DCHECK(write_callback_.is_null()); + CHECK(write_callback_.is_null()); // Synchronous operation not supported DCHECK(!callback.is_null()); DCHECK_LT(0, buf_len); diff --git a/net/socket/tcp_socket_win.cc b/net/socket/tcp_socket_win.cc index 35bfb9b..7c80a31 100644 --- a/net/socket/tcp_socket_win.cc +++ b/net/socket/tcp_socket_win.cc @@ -492,7 +492,7 @@ int TCPSocketWin::Read(IOBuffer* buf, DCHECK(CalledOnValidThread()); DCHECK_NE(socket_, INVALID_SOCKET); DCHECK(!waiting_read_); - DCHECK(read_callback_.is_null()); + CHECK(read_callback_.is_null()); DCHECK(!core_->read_iobuffer_); return DoRead(buf, buf_len, callback); @@ -504,7 +504,7 @@ int TCPSocketWin::Write(IOBuffer* buf, DCHECK(CalledOnValidThread()); DCHECK_NE(socket_, INVALID_SOCKET); DCHECK(!waiting_write_); - DCHECK(write_callback_.is_null()); + CHECK(write_callback_.is_null()); DCHECK_GT(buf_len, 0); DCHECK(!core_->write_iobuffer_); -- cgit v1.1