Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 22cdd03fd06f9e7c01ab3b3cb9224297f07d8269..67d64c47794b34068dd78393e380c692500a4b6b 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -4225,7 +4225,7 @@ void* FixedTypedArrayBase::DataPtr() { |
} |
-int FixedTypedArrayBase::DataSize(InstanceType type) { |
+int FixedTypedArrayBase::ElementSize(InstanceType type) { |
int element_size; |
switch (type) { |
#define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \ |
@@ -4239,7 +4239,12 @@ int FixedTypedArrayBase::DataSize(InstanceType type) { |
UNREACHABLE(); |
return 0; |
} |
- return length() * element_size; |
+ return element_size; |
+} |
+ |
+ |
+int FixedTypedArrayBase::DataSize(InstanceType type) { |
+ return length() * ElementSize(type); |
} |
@@ -4258,6 +4263,11 @@ int FixedTypedArrayBase::TypedArraySize(InstanceType type) { |
} |
+int FixedTypedArrayBase::TypedArraySize(InstanceType type, int length) { |
+ return OBJECT_POINTER_ALIGN(kDataOffset + length * ElementSize(type)); |
+} |
+ |
+ |
uint8_t Uint8ArrayTraits::defaultValue() { return 0; } |