Skip to content

Commit d404084

Browse files
author
Jianchun Xu
committed
[MERGE #519] delete the right indexed property
Merge pull request #519 from jianchun:deletebug In one delete property code path "propertyRecord->IsNumeric()" (bool) is passed for "uint32 index" parameter. Don't know why the compiler doesn't complain about it. So if it is run we always delete property "1". Seems the bug can only be hit through JSRT and also requires the object to use SimpleDictionaryTypeHandler.
2 parents b582b6f + ea6aede commit d404084

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Runtime/Types/SimpleDictionaryTypeHandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1638,7 +1638,7 @@ namespace Js
16381638
// Check for a numeric propertyRecord only if objectArray available
16391639
if (instance->HasObjectArray() && propertyRecord->IsNumeric())
16401640
{
1641-
return SimpleDictionaryTypeHandlerBase<TPropertyIndex, TMapKey, IsNotExtensibleSupported>::DeleteItem(instance, propertyRecord->IsNumeric(), propertyOperationFlags);
1641+
return SimpleDictionaryTypeHandlerBase<TPropertyIndex, TMapKey, IsNotExtensibleSupported>::DeleteItem(instance, propertyRecord->GetNumericValue(), propertyOperationFlags);
16421642
}
16431643
}
16441644
else

0 commit comments

Comments
 (0)