| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index 31ebbb18c8a42bf0399208099e20ac7f910c2d8c..f17540af484ce2e3b95e31f43ead0dbb4862fa60 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -3673,8 +3673,8 @@ void* FixedTypedArrayBase::DataPtr() {
|
| }
|
|
|
|
|
| -int FixedTypedArrayBase::DataSize() {
|
| - InstanceType instance_type = map()->instance_type();
|
| +int FixedTypedArrayBase::DataSizeFromMap(Map* map) {
|
| + InstanceType instance_type = map->instance_type();
|
| int element_size;
|
| switch (instance_type) {
|
| #define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \
|
| @@ -3693,7 +3693,12 @@ int FixedTypedArrayBase::DataSize() {
|
|
|
|
|
| int FixedTypedArrayBase::size() {
|
| - return OBJECT_POINTER_ALIGN(kDataOffset + DataSize());
|
| + return OBJECT_POINTER_ALIGN(kDataOffset + DataSizeFromMap(map()));
|
| +}
|
| +
|
| +
|
| +int FixedTypedArrayBase::SizeFromMap(Map* map) {
|
| + return OBJECT_POINTER_ALIGN(kDataOffset + DataSizeFromMap(map));
|
| }
|
|
|
|
|
| @@ -3951,7 +3956,7 @@ int HeapObject::SizeFromMap(Map* map) {
|
| }
|
| if (instance_type >= FIRST_FIXED_TYPED_ARRAY_TYPE &&
|
| instance_type <= LAST_FIXED_TYPED_ARRAY_TYPE) {
|
| - return reinterpret_cast<FixedTypedArrayBase*>(this)->size();
|
| + return reinterpret_cast<FixedTypedArrayBase*>(this)->SizeFromMap(map);
|
| }
|
| ASSERT(instance_type == CODE_TYPE);
|
| return reinterpret_cast<Code*>(this)->CodeSize();
|
|
|