Revision: 20519
Author: [email protected]
Date: Fri Apr 4 15:25:37 2014 UTC
Log: Compare external pixel data length against Smi::kMaxValue
BUG=chromium:359802
LOG=n
[email protected]
Review URL: https://codereview.chromium.org/226133002
http://code.google.com/p/v8/source/detail?r=20519
Modified:
/branches/bleeding_edge/src/api.cc
/branches/bleeding_edge/src/objects.h
=======================================
--- /branches/bleeding_edge/src/api.cc Fri Apr 4 12:25:45 2014 UTC
+++ /branches/bleeding_edge/src/api.cc Fri Apr 4 15:25:37 2014 UTC
@@ -3741,8 +3741,7 @@
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;
@@ -3798,7 +3797,7 @@
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;
=======================================
--- /branches/bleeding_edge/src/objects.h Fri Apr 4 13:57:53 2014 UTC
+++ /branches/bleeding_edge/src/objects.h Fri Apr 4 15:25:37 2014 UTC
@@ -4700,9 +4700,6 @@
// Casting.
static inline ExternalArray* cast(Object* obj);
- // Maximal acceptable length for an external array.
- static const int kMaxLength = 0x3fffffff;
-
// ExternalArray headers are not quadword aligned.
static const int kExternalPointerOffset =
POINTER_SIZE_ALIGN(FixedArrayBase::kLengthOffset + kPointerSize);
--
--
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/d/optout.