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

Unified Diff: mojo/edk/system/transport_data.cc

Issue 842523002: base: Change DCHECK_IS_ON to a macro DCHECK_IS_ON(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dcheck2: withoutandroidchange Created 5 years, 11 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
Index: mojo/edk/system/transport_data.cc
diff --git a/mojo/edk/system/transport_data.cc b/mojo/edk/system/transport_data.cc
index 300b7313ffed881042f6f1e29471f556a40da3cc..c80a98aca39ab34ca733b3eaf9278c555c843557 100644
--- a/mojo/edk/system/transport_data.cc
+++ b/mojo/edk/system/transport_data.cc
@@ -78,7 +78,7 @@ TransportData::TransportData(scoped_ptr<DispatcherVector> dispatchers,
// It must be at least as big as the (eventual) actual size.
size_t estimated_size = serialized_dispatcher_start_offset;
size_t estimated_num_platform_handles = 0;
-#if DCHECK_IS_ON
+#if DCHECK_IS_ON()
std::vector<size_t> all_max_sizes(num_handles);
std::vector<size_t> all_max_platform_handles(num_handles);
#endif
@@ -97,7 +97,7 @@ TransportData::TransportData(scoped_ptr<DispatcherVector> dispatchers,
estimated_num_platform_handles += max_platform_handles;
DCHECK_LE(estimated_num_platform_handles, GetMaxPlatformHandles());
-#if DCHECK_IS_ON
+#if DCHECK_IS_ON()
all_max_sizes[i] = max_size;
all_max_platform_handles[i] = max_platform_handles;
#endif
@@ -141,7 +141,7 @@ TransportData::TransportData(scoped_ptr<DispatcherVector> dispatchers,
continue;
}
-#if DCHECK_IS_ON
+#if DCHECK_IS_ON()
size_t old_platform_handles_size =
platform_handles_ ? platform_handles_->size() : 0;
#endif
@@ -156,7 +156,7 @@ TransportData::TransportData(scoped_ptr<DispatcherVector> dispatchers,
handle_table[i].size = static_cast<uint32_t>(actual_size);
// (Okay to not set |unused| since we cleared the entire buffer.)
-#if DCHECK_IS_ON
+#if DCHECK_IS_ON()
DCHECK_LE(actual_size, all_max_sizes[i]);
DCHECK_LE(platform_handles_
? (platform_handles_->size() - old_platform_handles_size)

Powered by Google App Engine
This is Rietveld 408576698