| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 00f1e0b7e156dd3f4a8810ddcb90f580450cefc0..bb78ff644cc5a6580263f9e67d12d83006372b57 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -2290,7 +2290,7 @@ void v8::Object::SetIndexedPropertiesToPixelData(uint8_t* data, int length) {
|
| ON_BAILOUT("v8::SetElementsToPixelData()", return);
|
| ENTER_V8;
|
| HandleScope scope;
|
| - if (!ApiCheck(i::Smi::IsValid(length),
|
| + if (!ApiCheck(length <= i::PixelArray::kMaxLength,
|
| "v8::Object::SetIndexedPropertiesToPixelData()",
|
| "length exceeds max acceptable value")) {
|
| return;
|
| @@ -2849,7 +2849,7 @@ Local<Value> v8::External::Wrap(void* data) {
|
| intptr_t data_value =
|
| static_cast<intptr_t>(data_ptr >> i::Internals::kAlignedPointerShift);
|
| STATIC_ASSERT(sizeof(data_ptr) == sizeof(data_value));
|
| - if (i::Smi::IsIntptrValid(data_value)) {
|
| + if (i::Smi::IsValid(data_value)) {
|
| i::Handle<i::Object> obj(i::Smi::FromIntptr(data_value));
|
| return Utils::ToLocal(obj);
|
| }
|
|
|