Skip to content

Commit 4cb3bbd

Browse files
pleathakroshg
authored andcommitted
1 parent f67a121 commit 4cb3bbd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/Runtime/Types/DictionaryTypeHandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ namespace Js
139139
PropertyString* propertyString = scriptContext->GetPropertyString(*propertyId);
140140
*propertyStringName = propertyString;
141141
T dataSlot = descriptor.template GetDataPropertyIndex<false>();
142-
if (dataSlot != NoSlots && (attribs & PropertyWritable))
142+
if (dataSlot != NoSlots && (attribs & PropertyWritable) && type == typeToEnumerate)
143143
{
144144
PropertyValueInfo::SetCacheInfo(info, propertyString, propertyString->GetLdElemInlineCache(), false);
145145
SetPropertyValueInfo(info, instance, dataSlot, &descriptor);

lib/Runtime/Types/SimpleTypeHandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ namespace Js
328328
*propertyStringName = propStr;
329329

330330
PropertyValueInfo::SetCacheInfo(info, propStr, propStr->GetLdElemInlineCache(), false);
331-
if ((attribs & PropertyWritable) == PropertyWritable)
331+
if ((attribs & PropertyWritable) == PropertyWritable && type == typeToEnumerate)
332332
{
333333
PropertyValueInfo::Set(info, instance, index, attribs);
334334
}

0 commit comments

Comments
 (0)