Index: src/elements-kind.cc |
diff --git a/src/elements-kind.cc b/src/elements-kind.cc |
index 200fea600a7623d9816925fd0421110d638842e3..c669917c42612e8665c9731b1a8b6bddc0c0b9c2 100644 |
--- a/src/elements-kind.cc |
+++ b/src/elements-kind.cc |
@@ -54,8 +54,14 @@ int ElementsKindToShiftSize(ElementsKind elements_kind) { |
int GetDefaultHeaderSizeForElementsKind(ElementsKind elements_kind) { |
STATIC_ASSERT(FixedArray::kHeaderSize == FixedDoubleArray::kHeaderSize); |
- return IsExternalArrayElementsKind(elements_kind) |
- ? 0 : (FixedArray::kHeaderSize - kHeapObjectTag); |
+ |
+ if (IsExternalArrayElementsKind(elements_kind)) { |
+ return 0; |
+ } else if (IsFixedTypedArrayElementsKind(elements_kind)) { |
+ return FixedTypedArrayBase::kDataOffset - kHeapObjectTag; |
+ } else { |
+ return FixedArray::kHeaderSize - kHeapObjectTag; |
+ } |
} |