Revision: 17734
Author: [email protected]
Date: Thu Nov 14 11:19:30 2013 UTC
Log: Revert "Harden NumberToSize against overflows."
This reverts commit r17733 for breaking Linux build.
[email protected]
BUG=
Review URL: https://codereview.chromium.org/69243005
http://code.google.com/p/v8/source/detail?r=17734
Modified:
/branches/bleeding_edge/src/v8conversions.h
=======================================
--- /branches/bleeding_edge/src/v8conversions.h Thu Nov 14 11:14:06 2013 UTC
+++ /branches/bleeding_edge/src/v8conversions.h Thu Nov 14 11:19:30 2013 UTC
@@ -60,15 +60,10 @@
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);
}
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.