diff options
Diffstat (limited to 'deps/v8/src/compiler/operator.cc')
-rw-r--r-- | deps/v8/src/compiler/operator.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/deps/v8/src/compiler/operator.cc b/deps/v8/src/compiler/operator.cc index 4f746e2944..e43cd5cdb0 100644 --- a/deps/v8/src/compiler/operator.cc +++ b/deps/v8/src/compiler/operator.cc @@ -14,7 +14,11 @@ namespace { template <typename N> V8_INLINE N CheckRange(size_t val) { - CHECK_LE(val, std::numeric_limits<N>::max()); + // The getters on Operator for input and output counts currently return int. + // Thus check that the given value fits in the integer range. + // TODO(titzer): Remove this check once the getters return size_t. + CHECK_LE(val, std::min(static_cast<size_t>(std::numeric_limits<N>::max()), + static_cast<size_t>(kMaxInt))); return static_cast<N>(val); } |