Harden runtime functions
Part 1 of many. R=dslomov@chromium.org Review URL: https://codereview.chromium.org/239313002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20836 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
6d475fb350
commit
09c615940c
335
src/runtime.cc
335
src/runtime.cc
File diff suppressed because it is too large
Load Diff
@ -75,8 +75,7 @@ inline bool TryNumberToSize(Isolate* isolate,
|
||||
SealHandleScope shs(isolate);
|
||||
if (number->IsSmi()) {
|
||||
int value = Smi::cast(number)->value();
|
||||
ASSERT(
|
||||
static_cast<unsigned>(Smi::kMaxValue)
|
||||
ASSERT(static_cast<unsigned>(Smi::kMaxValue)
|
||||
<= std::numeric_limits<size_t>::max());
|
||||
if (value >= 0) {
|
||||
*result = static_cast<size_t>(value);
|
||||
|
Loading…
Reference in New Issue
Block a user