summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvitalybuka <vitalybuka@chromium.org>2014-09-23 13:59:13 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-23 20:59:47 +0000
commit17ee0af873389eba94ebe7629a44045ecf0b681a (patch)
treeb0e1a8739f677bd7819440dd48eafaf6903273ab
parent0a2788afa23b82c428cd2bf00b06d5b510436fef (diff)
downloadchromium_src-17ee0af873389eba94ebe7629a44045ecf0b681a.zip
chromium_src-17ee0af873389eba94ebe7629a44045ecf0b681a.tar.gz
chromium_src-17ee0af873389eba94ebe7629a44045ecf0b681a.tar.bz2
DCHECK -> CHECK for UDPSocket Read/Write calls when previous in progress.
Crashes in net::AssertEventNotSignaled() are hard reproduce, but looks like this is the primary reason. With crash on CHECK(..._callback_.is_null()) we could identify incorrect code. BUG=415753 Review URL: https://codereview.chromium.org/580163003 Cr-Commit-Position: refs/heads/master@{#296234}
-rw-r--r--net/udp/udp_socket_libevent.cc4
-rw-r--r--net/udp/udp_socket_win.cc4
2 files changed, 4 insertions, 4 deletions
diff --git a/net/udp/udp_socket_libevent.cc b/net/udp/udp_socket_libevent.cc
index 7db3f96..9b1a995 100644
--- a/net/udp/udp_socket_libevent.cc
+++ b/net/udp/udp_socket_libevent.cc
@@ -170,7 +170,7 @@ int UDPSocketLibevent::RecvFrom(IOBuffer* buf,
const CompletionCallback& callback) {
DCHECK(CalledOnValidThread());
DCHECK_NE(kInvalidSocket, socket_);
- DCHECK(read_callback_.is_null());
+ CHECK(read_callback_.is_null());
DCHECK(!recv_from_address_);
DCHECK(!callback.is_null()); // Synchronous operation not supported
DCHECK_GT(buf_len, 0);
@@ -214,7 +214,7 @@ int UDPSocketLibevent::SendToOrWrite(IOBuffer* buf,
const CompletionCallback& callback) {
DCHECK(CalledOnValidThread());
DCHECK_NE(kInvalidSocket, socket_);
- DCHECK(write_callback_.is_null());
+ CHECK(write_callback_.is_null());
DCHECK(!callback.is_null()); // Synchronous operation not supported
DCHECK_GT(buf_len, 0);
diff --git a/net/udp/udp_socket_win.cc b/net/udp/udp_socket_win.cc
index f4af9b3..6b716a7 100644
--- a/net/udp/udp_socket_win.cc
+++ b/net/udp/udp_socket_win.cc
@@ -345,7 +345,7 @@ int UDPSocketWin::RecvFrom(IOBuffer* buf,
const CompletionCallback& callback) {
DCHECK(CalledOnValidThread());
DCHECK_NE(INVALID_SOCKET, socket_);
- DCHECK(read_callback_.is_null());
+ CHECK(read_callback_.is_null());
DCHECK(!recv_from_address_);
DCHECK(!callback.is_null()); // Synchronous operation not supported.
DCHECK_GT(buf_len, 0);
@@ -378,7 +378,7 @@ int UDPSocketWin::SendToOrWrite(IOBuffer* buf,
const CompletionCallback& callback) {
DCHECK(CalledOnValidThread());
DCHECK_NE(INVALID_SOCKET, socket_);
- DCHECK(write_callback_.is_null());
+ CHECK(write_callback_.is_null());
DCHECK(!callback.is_null()); // Synchronous operation not supported.
DCHECK_GT(buf_len, 0);
DCHECK(!send_to_address_.get());