Index: src/lookup.cc |
diff --git a/src/lookup.cc b/src/lookup.cc |
index 3df8752c01a7108ce145875a55d51bdab4185293..7cc2666f964f7eca3f3ad3e4d521ab9f2362b82f 100644 |
--- a/src/lookup.cc |
+++ b/src/lookup.cc |
@@ -414,7 +414,10 @@ void LookupIterator::TransitionToAccessorProperty( |
pair = Handle<AccessorPair>::cast(GetAccessors()); |
// If the component and attributes are identical, nothing has to be done. |
if (pair->get(component) == *accessor) { |
- if (property_details().attributes() == attributes) return; |
+ if (property_details().attributes() == attributes) { |
+ if (!IsElement()) JSObject::ReoptimizeIfPrototype(receiver); |
+ return; |
+ } |
} else { |
pair = AccessorPair::Copy(pair); |
pair->set(component, *accessor); |