Commit 9bbc7f03 authored by jochen@chromium.org's avatar jochen@chromium.org

Re-enable the check in GetRangeConstraint() function.

Now that we have ASSERT() macro in src/base/logging.h we can use it in
safe_conversions_impl.h, re-enable this assertion and fix the TODO
there.

BUG=None
TEST=None
R=jochen@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/369483003

Patch from Thiago Farina <tfarina@chromium.org>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 7717f236
......@@ -10,6 +10,7 @@
#include <limits>
#include "src/base/logging.h"
#include "src/base/macros.h"
namespace v8 {
......@@ -98,9 +99,8 @@ enum RangeConstraint {
// Helper function for coercing an int back to a RangeContraint.
inline RangeConstraint GetRangeConstraint(int integer_range_constraint) {
// TODO(jochen/jkummerow): Re-enable this when checks.h is available in base.
// ASSERT(integer_range_constraint >= RANGE_VALID &&
// integer_range_constraint <= RANGE_INVALID);
ASSERT(integer_range_constraint >= RANGE_VALID &&
integer_range_constraint <= RANGE_INVALID);
return static_cast<RangeConstraint>(integer_range_constraint);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment