| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 6242198ec33e9f0e1f022c9ebef5bcadd42fef00..b6a36def148e4694d3fba2356591b180f1748819 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -9512,23 +9512,24 @@ int JSObject::GetLocalElementKeys(FixedArray* storage,
|
| }
|
| case NON_STRICT_ARGUMENTS_ELEMENTS: {
|
| FixedArray* parameter_map = FixedArray::cast(elements());
|
| + FixedArray* arguments = FixedArray::cast(parameter_map->get(1));
|
| + if (arguments->IsDictionary()) {
|
| + NumberDictionary* dictionary = NumberDictionary::cast(arguments);
|
| + if (storage != NULL) dictionary->CopyKeysTo(storage, filter);
|
| + counter += dictionary->NumberOfElementsFilterAttributes(filter);
|
| + }
|
| int length = parameter_map->length();
|
| for (int i = 2; i < length; ++i) {
|
| if (!parameter_map->get(i)->IsTheHole()) {
|
| - if (storage != NULL) storage->set(i - 2, Smi::FromInt(i - 2));
|
| + if (storage != NULL) storage->set(counter, Smi::FromInt(i - 2));
|
| ++counter;
|
| }
|
| }
|
| - FixedArray* arguments = FixedArray::cast(parameter_map->get(1));
|
| - if (arguments->IsDictionary()) {
|
| - NumberDictionary* dictionary = NumberDictionary::cast(arguments);
|
| - if (storage != NULL) dictionary->CopyKeysTo(storage, filter);
|
| - counter += dictionary->NumberOfElementsFilterAttributes(filter);
|
| - } else {
|
| + if (!arguments->IsDictionary()) {
|
| int length = arguments->length();
|
| for (int i = 0; i < length; ++i) {
|
| if (!arguments->get(i)->IsTheHole()) {
|
| - if (storage != NULL) storage->set(i, Smi::FromInt(i));
|
| + if (storage != NULL) storage->set(counter, Smi::FromInt(i));
|
| ++counter;
|
| }
|
| }
|
|
|