Index: src/lookup.cc |
diff --git a/src/lookup.cc b/src/lookup.cc |
index 296d192083a76120b5e5a6697ae8822130f00495..716622b475de66d098dfa587ad8b467f47d01f6d 100644 |
--- a/src/lookup.cc |
+++ b/src/lookup.cc |
@@ -156,19 +156,12 @@ void LookupIterator::ReconfigureDataProperty(Handle<Object> value, |
DCHECK(HolderIsReceiverOrHiddenPrototype()); |
Handle<JSObject> holder = GetHolder<JSObject>(); |
if (IsElement()) { |
- // TODO(verwaest): Clean up. |
- DCHECK(holder->HasFastElements() || holder->HasDictionaryElements() || |
- holder->HasSloppyArgumentsElements()); |
+ DCHECK(!holder->HasExternalArrayElements()); |
+ DCHECK(!holder->HasFixedTypedArrayElements()); |
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 { |
- JSObject::SetDictionaryArgumentsElement(holder, index(), value, |
- attributes); |
- } |
+ Handle<FixedArrayBase> elements(holder->elements()); |
+ holder->GetElementsAccessor()->Reconfigure(holder, elements, number_, value, |
+ attributes); |
} else if (holder_map_->is_dictionary_map()) { |
PropertyDetails details(attributes, v8::internal::DATA, 0, |
PropertyCellType::kMutable); |