Chromium Code Reviews| Index: src/elements.cc |
| diff --git a/src/elements.cc b/src/elements.cc |
| index 85eb3f266ecdb135e0ac8081d2b0d08bdd330477..1db8d06d580054fd18278685c758167faf00754c 100644 |
| --- a/src/elements.cc |
| +++ b/src/elements.cc |
| @@ -949,8 +949,9 @@ class DictionaryElementsAccessor |
| Handle<FixedArrayBase> store, uint32_t entry, |
| Handle<Object> value, |
| PropertyAttributes attributes) { |
| - SeededNumberDictionary* dictionary = SeededNumberDictionary::cast(*store); |
| - if (attributes != NONE) dictionary->set_requires_slow_elements(); |
| + Handle<SeededNumberDictionary> dictionary( |
| + SeededNumberDictionary::cast(*store)); |
| + if (attributes != NONE) JSObject::RequireSlowElements(object, dictionary); |
| dictionary->ValueAtPut(entry, *value); |
| PropertyDetails details = dictionary->DetailsAt(entry); |
| details = PropertyDetails(attributes, DATA, details.dictionary_index(), |
| @@ -969,7 +970,9 @@ class DictionaryElementsAccessor |
| Handle<SeededNumberDictionary> new_dictionary = |
| SeededNumberDictionary::AddNumberEntry(dictionary, index, value, |
| details); |
| - if (attributes != NONE) new_dictionary->set_requires_slow_elements(); |
| + if (attributes != NONE) { |
| + JSObject::RequireSlowElements(object, new_dictionary); |
| + } |
| if (dictionary.is_identical_to(new_dictionary)) return; |
| object->set_elements(*new_dictionary); |
| } |
| @@ -1614,7 +1617,9 @@ class SlowSloppyArgumentsElementsAccessor |
| Handle<SeededNumberDictionary> new_dictionary = |
| SeededNumberDictionary::AddNumberEntry(dictionary, index, value, |
| details); |
| - if (attributes != NONE) new_dictionary->set_requires_slow_elements(); |
| + if (attributes != NONE) { |
| + JSObject::RequireSlowElements(object, new_dictionary); |
| + } |
| if (*dictionary != *new_dictionary) { |
| FixedArray::cast(object->elements())->set(1, *new_dictionary); |
| } |
| @@ -1647,6 +1652,7 @@ class SlowSloppyArgumentsElementsAccessor |
| SeededNumberDictionary::cast(parameter_map->get(1))); |
| arguments = SeededNumberDictionary::AddNumberEntry(arguments, entry, |
| value, details); |
| + JSObject::RequireSlowElements(object, arguments); |
|
Igor Sheludko
2015/07/15 10:53:17
Why not "if (attributes != NONE)" here?
|
| parameter_map->set(1, *arguments); |
| } else { |
| Handle<FixedArrayBase> arguments( |