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

Unified Diff: src/objects.cc

Issue 246523004: Avoid setting transitions in-place for cached maps when observed (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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-observe-map-cache.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index f28430430ff4060552b80d8c59bcd4214f4fe038..e1cdc625fb1b78e7af5521858e4019ff3c5c1f86 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -5816,7 +5816,7 @@ void JSObject::SetObserved(Handle<JSObject> object) {
if (transition_index != TransitionArray::kNotFound) {
new_map = handle(old_map->GetTransition(transition_index), isolate);
ASSERT(new_map->is_observed());
- } else if (old_map->CanHaveMoreTransitions()) {
+ } else if (object->HasFastProperties() && old_map->CanHaveMoreTransitions()) {
new_map = Map::CopyForObserved(old_map);
} else {
new_map = Map::Copy(old_map);
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-observe-map-cache.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698