Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 060914a8d84973d0cfae15f091741ba0da9795d1..551cefb87659609b354c7ea0b1f5f0acd3cc5b39 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -3744,8 +3744,7 @@ void v8::Object::SetIndexedPropertiesToPixelData(uint8_t* data, int length) { |
ON_BAILOUT(isolate, "v8::SetElementsToPixelData()", return); |
ENTER_V8(isolate); |
i::HandleScope scope(isolate); |
- if (!Utils::ApiCheck(length >= 0 && |
- length <= i::ExternalUint8ClampedArray::kMaxLength, |
+ if (!Utils::ApiCheck(length >= 0 && length <= i::Smi::kMaxValue, |
"v8::Object::SetIndexedPropertiesToPixelData()", |
"length exceeds max acceptable value")) { |
return; |
@@ -3801,7 +3800,7 @@ void v8::Object::SetIndexedPropertiesToExternalArrayData( |
ON_BAILOUT(isolate, "v8::SetIndexedPropertiesToExternalArrayData()", return); |
ENTER_V8(isolate); |
i::HandleScope scope(isolate); |
- if (!Utils::ApiCheck(length >= 0 && length <= i::ExternalArray::kMaxLength, |
+ if (!Utils::ApiCheck(length >= 0 && length <= i::Smi::kMaxValue, |
"v8::Object::SetIndexedPropertiesToExternalArrayData()", |
"length exceeds max acceptable value")) { |
return; |