Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(631)

Unified Diff: src/lookup.cc

Issue 1228113003: Fix non-standard element handling (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix and expand tests Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/lookup.cc
diff --git a/src/lookup.cc b/src/lookup.cc
index 7bc3aebe84cec4a11bd2bdd69dd1beeb235ad1ae..3acc6e2a00ed76825174a5e4e5f9e3ed46b2274d 100644
--- a/src/lookup.cc
+++ b/src/lookup.cc
@@ -321,13 +321,11 @@ void LookupIterator::TransitionToAccessorPair(Handle<Object> pair,
// TODO(verwaest): Remove this hack once we have a quick way to check the
Igor Sheludko 2015/07/15 10:53:17 This TODO does not belong here anymore. Maybe move
// prototype chain in element setters.
// TODO(verwaest): Move code into the element accessor.
- bool was_dictionary = receiver->HasDictionaryElements();
Handle<SeededNumberDictionary> dictionary =
JSObject::NormalizeElements(receiver);
- was_dictionary = was_dictionary && dictionary->requires_slow_elements();
dictionary = SeededNumberDictionary::Set(dictionary, index_, pair, details);
- dictionary->set_requires_slow_elements();
+ JSObject::RequireSlowElements(receiver, dictionary);
if (receiver->HasSlowArgumentsElements()) {
FixedArray* parameter_map = FixedArray::cast(receiver->elements());
@@ -338,7 +336,6 @@ void LookupIterator::TransitionToAccessorPair(Handle<Object> pair,
FixedArray::cast(receiver->elements())->set(1, *dictionary);
} else {
receiver->set_elements(*dictionary);
- if (!was_dictionary) heap()->ClearAllICsByKind(Code::KEYED_STORE_IC);
}
} else {
PropertyNormalizationMode mode = receiver->map()->is_prototype_map()

Powered by Google App Engine
This is Rietveld 408576698