Browse files

[1.11>master] [MERGE #5683 @VSadov] Do not lose property string in To…


Merge pull request #5683 from VSadov:propString

Looks like the intent of the method is to set propString to a property string if the argument happen to be one. It does not do that now. Possibly due to a typo.

In particular, methods such as HasOwnProperty check if propString is returned and would use its inline caches, but since the property string is not returned, the optimization cannot work.
  • Loading branch information...
VSadov committed Sep 11, 2018
2 parents e2ae5db + 0e9faf2 commit 21a310e64f0107d2a05f151d5ed83843352472a4
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/Runtime/Language/JavascriptConversion.cpp
@@ -285,6 +285,10 @@ using namespace Js;
// For all other types, convert the key into a string and use that as the property name
JavascriptString * propName = JavascriptConversion::ToString(key, scriptContext);
if (PropertyString::Is(propName))
propertyString = PropertyString::UnsafeFromVar(propName);
if (propString)

0 comments on commit 21a310e

Please sign in to comment.