Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(693)

Unified Diff: net/spdy/spdy_write_queue.cc

Issue 195973002: Change DCHECK_IS_ON() to DCHECK_IS_ON (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Keep a comment Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | sync/internal_api/http_bridge.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_write_queue.cc
diff --git a/net/spdy/spdy_write_queue.cc b/net/spdy/spdy_write_queue.cc
index ea6eb1f292243651f148ae63984da6f01ca61fb5..3a4eef5fea67df0a6975104b05c21e2b3e929171 100644
--- a/net/spdy/spdy_write_queue.cc
+++ b/net/spdy/spdy_write_queue.cc
@@ -77,18 +77,18 @@ void SpdyWriteQueue::RemovePendingWritesForStream(
CHECK_LE(priority, MAXIMUM_PRIORITY);
DCHECK(stream.get());
- 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) {
- if (priority == i)
- continue;
- for (std::deque<PendingWrite>::const_iterator it = queue_[i].begin();
- it != queue_[i].end(); ++it) {
- DCHECK_NE(it->stream.get(), stream.get());
- }
+#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) {
+ if (priority == i)
+ continue;
+ for (std::deque<PendingWrite>::const_iterator it = queue_[i].begin();
+ it != queue_[i].end(); ++it) {
+ DCHECK_NE(it->stream.get(), stream.get());
}
}
+#endif
// Do the actual deletion and removal, preserving FIFO-ness.
std::deque<PendingWrite>* queue = &queue_[priority];
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | sync/internal_api/http_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698