summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authordanakj <danakj@chromium.org>2015-01-08 15:35:58 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-08 23:37:17 +0000
commite649f573a38b00bb20fe0925098251a4ff184566 (patch)
tree6f400822726e85def4cad5a1ee704e232a6364ad /net
parent95bc5b1779dcf8e4a9e37ef600c0ea76293307e3 (diff)
downloadchromium_src-e649f573a38b00bb20fe0925098251a4ff184566.zip
chromium_src-e649f573a38b00bb20fe0925098251a4ff184566.tar.gz
chromium_src-e649f573a38b00bb20fe0925098251a4ff184566.tar.bz2
base: Change DCHECK_IS_ON to a macro DCHECK_IS_ON().
This ensures that if the header is not included, and a DCHECK is guarded by this check, that the file will fail to compile instead of silently compiling the DCHECK out. For example: #if DCHECK_IS_ON DCHECK(SomeThing()); #endif This example would be compiled out if DCHECK_IS_ON was not defined due to not including the logging.h header. Instead, this will fail to compile: #if DCHECK_IS_ON() DCHECK(SomeThing()); #endif R=thakis@chromium.org Review URL: https://codereview.chromium.org/842523002 Cr-Commit-Position: refs/heads/master@{#310626}
Diffstat (limited to 'net')
-rw-r--r--net/spdy/spdy_session.cc6
-rw-r--r--net/spdy/spdy_write_queue.cc2
2 files changed, 4 insertions, 4 deletions
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index a2e239e..d481118 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -918,7 +918,7 @@ void SpdySession::CancelStreamRequest(
CHECK_GE(priority, MINIMUM_PRIORITY);
CHECK_LE(priority, MAXIMUM_PRIORITY);
-#if DCHECK_IS_ON
+#if DCHECK_IS_ON()
// |request| should not be in a queue not matching its priority.
for (int i = MINIMUM_PRIORITY; i <= MAXIMUM_PRIORITY; ++i) {
if (priority == i)
@@ -1631,7 +1631,7 @@ int SpdySession::DoWriteComplete(int result) {
}
void SpdySession::DcheckGoingAway() const {
-#if DCHECK_IS_ON
+#if DCHECK_IS_ON()
DCHECK_GE(availability_state_, STATE_GOING_AWAY);
for (int i = MINIMUM_PRIORITY; i <= MAXIMUM_PRIORITY; ++i) {
DCHECK(pending_create_stream_queues_[i].empty());
@@ -3248,7 +3248,7 @@ void SpdySession::ResumeSendStalledStreams() {
while (!IsSendStalled()) {
size_t old_size = 0;
-#if DCHECK_IS_ON
+#if DCHECK_IS_ON()
old_size = GetTotalSize(stream_send_unstall_queue_);
#endif
diff --git a/net/spdy/spdy_write_queue.cc b/net/spdy/spdy_write_queue.cc
index 05b965d..ab25eae 100644
--- a/net/spdy/spdy_write_queue.cc
+++ b/net/spdy/spdy_write_queue.cc
@@ -83,7 +83,7 @@ void SpdyWriteQueue::RemovePendingWritesForStream(
CHECK_LE(priority, MAXIMUM_PRIORITY);
DCHECK(stream.get());
-#if DCHECK_IS_ON
+#if DCHECK_IS_ON()
// |stream| should not have pending writes in a queue not matching
// its priority.
for (int i = MINIMUM_PRIORITY; i <= MAXIMUM_PRIORITY; ++i) {