Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index c60b8046186078daf860807e935e625955ac972e..e17346a27893b20f91a00f8795e6bca11cdcce93 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -10355,6 +10355,8 @@ static bool IterateElements(Isolate* isolate, |
} |
case FAST_HOLEY_DOUBLE_ELEMENTS: |
case FAST_DOUBLE_ELEMENTS: { |
+ // Empty array is FixedArray but not FixedDoubleArray. |
+ if (length == 0) break; |
// Run through the elements FixedArray and use HasElement and GetElement |
// to check the prototype for missing elements. |
Handle<FixedDoubleArray> elements( |
@@ -10559,8 +10561,8 @@ RUNTIME_FUNCTION(Runtime_ArrayConcat) { |
switch (array->map()->elements_kind()) { |
case FAST_HOLEY_DOUBLE_ELEMENTS: |
case FAST_DOUBLE_ELEMENTS: { |
- // Empty fixed array indicates that there are no elements. |
- if (array->elements()->IsFixedArray()) break; |
+ // Empty array is FixedArray but not FixedDoubleArray. |
+ if (length == 0) break; |
FixedDoubleArray* elements = |
FixedDoubleArray::cast(array->elements()); |
for (uint32_t i = 0; i < length; i++) { |