Index: src/v8conversions.h |
diff --git a/src/v8conversions.h b/src/v8conversions.h |
index b1d96b4b8a9ab4d87a2c3b78948c2e0c0245eb30..3a7b5242ab79af659b15e99b0a6d53f967cd91d1 100644 |
--- a/src/v8conversions.h |
+++ b/src/v8conversions.h |
@@ -60,15 +60,10 @@ inline size_t NumberToSize(Isolate* isolate, |
Object* number) { |
SealHandleScope shs(isolate); |
if (number->IsSmi()) { |
- int value = Smi::cast(number)->value(); |
- CHECK_GE(value, 0); |
- ASSERT(Smi::kMaxValue <= std::numeric_limits<size_t>::max()); |
- return static_cast<size_t>(value); |
+ return Smi::cast(number)->value(); |
} else { |
ASSERT(number->IsHeapNumber()); |
double value = HeapNumber::cast(number)->value(); |
- CHECK(value >= 0 && |
- value <= std::numeric_limits<size_t>::max()); |
return static_cast<size_t>(value); |
} |
} |