Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index d68b8722dc67d417c6d65a35fb97df0b88445a42..640865cacfd3b48ca8ef64ba4baa6ebdb1c66c1d 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -4637,7 +4637,20 @@ MaybeObject* PolymorphicCodeCacheHashTable::Put(MapList* maps, |
MaybeObject* FixedArray::AddKeysFromJSArray(JSArray* array) { |
- return array->GetElementsAccessor()->AddJSArrayKeysToFixedArray(array, this); |
+ ElementsAccessor* accessor = array->GetElementsAccessor(); |
+ MaybeObject* maybe_result = |
+ accessor->AddElementsToFixedArray(array->elements(), this); |
+ FixedArray* result; |
+ if (!maybe_result->To<FixedArray>(&result)) return maybe_result; |
+#ifdef DEBUG |
+ if (FLAG_enable_slow_asserts) { |
+ for (int i = 0; i < result->length(); i++) { |
+ Object* current = result->get(i); |
+ ASSERT(current->IsNumber() || current->IsString()); |
+ } |
+ } |
+#endif |
+ return result; |
} |