Index: src/lookup.cc |
diff --git a/src/lookup.cc b/src/lookup.cc |
index b91ad4c9f4bb9ec1b12db7e548bfac0fe27e2fc0..783c3f7536b69a423388f54702943a16b4b35c87 100644 |
--- a/src/lookup.cc |
+++ b/src/lookup.cc |
@@ -173,21 +173,17 @@ void LookupIterator::ReconfigureDataProperty(Handle<Object> value, |
Handle<JSObject> holder = GetHolder<JSObject>(); |
if (IsElement()) { |
// TODO(verwaest): Clean up. |
- if (attributes == NONE && !holder->HasDictionaryElements() && |
- !holder->HasDictionaryArgumentsElements()) { |
- ElementsAccessor* accessor = holder->GetElementsAccessor(); |
- accessor->Set(holder, index(), value); |
+ DCHECK(holder->HasFastElements() || holder->HasDictionaryElements() || |
+ holder->HasSloppyArgumentsElements()); |
+ DCHECK(attributes != NONE || !holder->HasFastElements()); |
+ Handle<SeededNumberDictionary> d = JSObject::NormalizeElements(holder); |
+ // TODO(verwaest): Move this into NormalizeElements. |
+ d->set_requires_slow_elements(); |
+ if (holder->HasDictionaryElements()) { |
+ JSObject::SetDictionaryElement(holder, index(), value, attributes); |
} else { |
- DCHECK(holder->HasFastElements() || holder->HasDictionaryElements() || |
- holder->HasSloppyArgumentsElements()); |
- Handle<SeededNumberDictionary> d = JSObject::NormalizeElements(holder); |
- // TODO(verwaest): Move this into NormalizeElements. |
- d->set_requires_slow_elements(); |
- if (holder->HasDictionaryElements()) { |
- JSObject::SetDictionaryElement(holder, index(), value, attributes); |
- } else { |
- JSObject::SetSloppyArgumentsElement(holder, index(), value, attributes); |
- } |
+ JSObject::SetDictionaryArgumentsElement(holder, index(), value, |
+ attributes); |
} |
} else if (holder_map_->is_dictionary_map()) { |
PropertyDetails details(attributes, v8::internal::DATA, 0, |