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

Unified Diff: mojo/public/cpp/bindings/lib/array_internal.h

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
Index: mojo/public/cpp/bindings/lib/array_internal.h
diff --git a/mojo/public/cpp/bindings/lib/array_internal.h b/mojo/public/cpp/bindings/lib/array_internal.h
index f1682256c81e8ffe18abf3d6c0ba1223500da513..190f6da9ea1c95be544fd21e082968e2a2e51630 100644
--- a/mojo/public/cpp/bindings/lib/array_internal.h
+++ b/mojo/public/cpp/bindings/lib/array_internal.h
@@ -13,6 +13,7 @@
#include "mojo/public/cpp/bindings/lib/bounds_checker.h"
#include "mojo/public/cpp/bindings/lib/buffer.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
+#include "mojo/public/cpp/environment/logging.h"
namespace mojo {
template <typename T> class Array;
@@ -267,12 +268,12 @@ class Array_Data {
size_t size() const { return header_.num_elements; }
Ref at(size_t offset) {
- assert(offset < static_cast<size_t>(header_.num_elements));
+ MOJO_DCHECK(offset < static_cast<size_t>(header_.num_elements));
return Traits::ToRef(storage(), offset);
}
ConstRef at(size_t offset) const {
- assert(offset < static_cast<size_t>(header_.num_elements));
+ MOJO_DCHECK(offset < static_cast<size_t>(header_.num_elements));
return Traits::ToConstRef(storage(), offset);
}
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/lib/bindings_serialization.cc » ('j') | mojo/public/cpp/bindings/lib/bounds_checker.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698