Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pleath authored and akroshg committed Apr 8, 2019
1 parent f67a121 commit 4cb3bbd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Runtime/Types/DictionaryTypeHandler.cpp
Expand Up @@ -139,7 +139,7 @@ namespace Js
PropertyString* propertyString = scriptContext->GetPropertyString(*propertyId);
*propertyStringName = propertyString;
T dataSlot = descriptor.template GetDataPropertyIndex<false>();
if (dataSlot != NoSlots && (attribs & PropertyWritable))
if (dataSlot != NoSlots && (attribs & PropertyWritable) && type == typeToEnumerate)
{
PropertyValueInfo::SetCacheInfo(info, propertyString, propertyString->GetLdElemInlineCache(), false);
SetPropertyValueInfo(info, instance, dataSlot, &descriptor);
Expand Down
2 changes: 1 addition & 1 deletion lib/Runtime/Types/SimpleTypeHandler.cpp
Expand Up @@ -328,7 +328,7 @@ namespace Js
*propertyStringName = propStr;

PropertyValueInfo::SetCacheInfo(info, propStr, propStr->GetLdElemInlineCache(), false);
if ((attribs & PropertyWritable) == PropertyWritable)
if ((attribs & PropertyWritable) == PropertyWritable && type == typeToEnumerate)
{
PropertyValueInfo::Set(info, instance, index, attribs);
}
Expand Down

0 comments on commit 4cb3bbd

Please sign in to comment.