File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -1038,14 +1038,21 @@ MapUpdater::State MapUpdater::ConstructNewMap() {
1038
1038
Handle <Map> new_map =
1039
1039
Map::AddMissingTransitions (isolate_, split_map, new_descriptors);
1040
1040
1041
+ bool had_any_enum_cache =
1042
+ split_map->instance_descriptors (isolate_)
1043
+ ->enum_cache ()
1044
+ ->keys ()
1045
+ ->length () > 0 ||
1046
+ old_descriptors_->enum_cache ()->keys ()->length () > 0 ;
1047
+
1041
1048
// Deprecated part of the transition tree is no longer reachable, so replace
1042
1049
// current instance descriptors in the "survived" part of the tree with
1043
1050
// the new descriptors to maintain descriptors sharing invariant.
1044
1051
split_map->ReplaceDescriptors (isolate_, *new_descriptors);
1045
1052
1046
- // If the old descriptors had an enum cache, make sure the new ones do too.
1047
- if (old_descriptors_-> enum_cache ()-> keys ()-> length () > 0 &&
1048
- new_map->NumberOfEnumerableProperties () > 0 ) {
1053
+ // If the old descriptors had an enum cache (or if {split_map}'s descriptors
1054
+ // had one), make sure the new ones do too.
1055
+ if (had_any_enum_cache && new_map->NumberOfEnumerableProperties () > 0 ) {
1049
1056
FastKeyAccumulator::InitializeFastPropertyEnumCache (
1050
1057
isolate_, new_map, new_map->NumberOfEnumerableProperties ());
1051
1058
}
You can’t perform that action at this time.
0 commit comments