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

Unified Diff: mojo/public/cpp/bindings/lib/bounds_checker.cc

Issue 399313007: Mojo: Convert assert()s under mojo/public/cpp/bindings/... to MOJO_DCHECK()s. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « mojo/public/cpp/bindings/lib/bindings_serialization.cc ('k') | mojo/public/cpp/bindings/lib/connector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/bounds_checker.cc
diff --git a/mojo/public/cpp/bindings/lib/bounds_checker.cc b/mojo/public/cpp/bindings/lib/bounds_checker.cc
index cf1f3238e03a4d2dafcf52167a3a767a715de6c9..87f5b7c0396d1458f0e30f44d525fa7655c83986 100644
--- a/mojo/public/cpp/bindings/lib/bounds_checker.cc
+++ b/mojo/public/cpp/bindings/lib/bounds_checker.cc
@@ -4,10 +4,9 @@
#include "mojo/public/cpp/bindings/lib/bounds_checker.h"
-#include <assert.h>
-
#include "mojo/public/cpp/bindings/lib/bindings_serialization.h"
-#include "mojo/public/cpp/system/core.h"
+#include "mojo/public/cpp/environment/logging.h"
+#include "mojo/public/cpp/system/handle.h"
namespace mojo {
namespace internal {
@@ -22,13 +21,13 @@ BoundsChecker::BoundsChecker(const void* data, uint32_t data_num_bytes,
// The calculation of |data_end_| overflowed.
// It shouldn't happen but if it does, set the range to empty so
// IsValidRange() and ClaimMemory() always fail.
- assert(false); // Not reached.
+ MOJO_DCHECK(false) << "Not reached";
yzshen1 2014/07/18 20:56:45 It seems nice to have a NOTREACHED macro.
data_end_ = data_begin_;
}
if (handle_end_ < num_handles) {
// Assigning |num_handles| to |handle_end_| overflowed.
// It shouldn't happen but if it does, set the handle index range to empty.
- assert(false); // Not reached.
+ MOJO_DCHECK(false) << "Not reached";
handle_end_ = 0;
}
}
« no previous file with comments | « mojo/public/cpp/bindings/lib/bindings_serialization.cc ('k') | mojo/public/cpp/bindings/lib/connector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698