| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index efb7aeeccdf6288740a073f39b82c1ee4d3aaaac..0cafaf591e0c59690414feae72c8642f3b20b0d5 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -4232,7 +4232,6 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DefineOrRedefineDataProperty) {
|
| // DONT_DELETE: false, DONT_ENUM: false, READ_ONLY: false.
|
| if (is_element && (attr != NONE ||
|
| js_object->HasLocalElement(index) == JSObject::DICTIONARY_ELEMENT)) {
|
| - // Normalize the elements to enable attributes on the property.
|
| if (js_object->IsJSGlobalProxy()) {
|
| // We do not need to do access checks here since these has already
|
| // been performed by the call to GetOwnProperty.
|
| @@ -4253,19 +4252,10 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DefineOrRedefineDataProperty) {
|
| return isolate->Throw(*error);
|
| }
|
|
|
| - Handle<NumberDictionary> dictionary = NormalizeElements(js_object);
|
| - // Make sure that we never go back to fast case.
|
| - dictionary->set_requires_slow_elements();
|
| - PropertyDetails details = PropertyDetails(attr, NORMAL);
|
| - Handle<NumberDictionary> extended_dictionary =
|
| - NumberDictionarySet(dictionary, index, obj_value, details);
|
| - if (*extended_dictionary != *dictionary) {
|
| - if (js_object->GetElementsKind() == NON_STRICT_ARGUMENTS_ELEMENTS) {
|
| - FixedArray::cast(js_object->elements())->set(1, *extended_dictionary);
|
| - } else {
|
| - js_object->set_elements(*extended_dictionary);
|
| - }
|
| - }
|
| + js_object->GetElementsAccessor()->Set(*js_object,
|
| + index,
|
| + *obj_value,
|
| + attr);
|
| return *obj_value;
|
| }
|
|
|
|
|