summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorvitalybuka <vitalybuka@chromium.org>2014-09-29 10:14:19 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-29 17:15:08 +0000
commit63b47546afb414f9e62a9a64518a92c5aeb0ce63 (patch)
treee3a26449a306938a0428236f69a41b8d4a0498d3 /net
parentd79fcd2c10a05df6160dc49a39bb3e3facab7df0 (diff)
downloadchromium_src-63b47546afb414f9e62a9a64518a92c5aeb0ce63.zip
chromium_src-63b47546afb414f9e62a9a64518a92c5aeb0ce63.tar.gz
chromium_src-63b47546afb414f9e62a9a64518a92c5aeb0ce63.tar.bz2
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}
Diffstat (limited to 'net')
-rw-r--r--net/socket/socket_libevent.cc4
-rw-r--r--net/socket/tcp_socket_win.cc4
2 files changed, 4 insertions, 4 deletions
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_);