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

Unified Diff: src/lookup.cc

Issue 1907953002: Make sure we always try to make prototypes fast again when transitioning accessors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-605060.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-605060.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698