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

Unified Diff: src/objects.cc

Issue 11145017: Invalidate the enum cache when converting a transition across which the descriptors are shared. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove expose-gc dependency Created 8 years, 2 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-convert-enum2.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 10c10ea0e411b7a337782a7bbc6912e9613fa00d..7dcefa2da6c4643ccdda8f8ce4ec76b27d33fb21 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -1806,9 +1806,6 @@ MaybeObject* JSObject::ConvertTransitionToMapTransition(
Map* map;
DescriptorArray* new_descriptors = new_map->instance_descriptors();
DescriptorArray* old_descriptors = old_map->instance_descriptors();
- if (old_descriptors->HasEnumCache()) {
- new_descriptors->CopyEnumCacheFrom(old_descriptors);
- }
for (Object* current = old_map;
!current->IsUndefined();
current = map->GetBackPointer()) {
@@ -1816,6 +1813,7 @@ MaybeObject* JSObject::ConvertTransitionToMapTransition(
if (!map->HasTransitionArray()) break;
TransitionArray* transitions = map->transitions();
if (transitions->descriptors() != old_descriptors) break;
+ map->SetEnumLength(Map::kInvalidEnumCache);
transitions->set_descriptors(new_descriptors);
}
old_map->set_owns_descriptors(false);
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-convert-enum2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698