Chromium Code Reviews| 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; |
| } |
| } |