diff options
Diffstat (limited to 'src/qml/jsruntime/qv4string.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4string.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4string.cpp b/src/qml/jsruntime/qv4string.cpp index ce5bc7f13e..7c1aef482a 100644 --- a/src/qml/jsruntime/qv4string.cpp +++ b/src/qml/jsruntime/qv4string.cpp @@ -166,7 +166,7 @@ uint String::toUInt(bool *ok) const return UINT_MAX; } -void String::makeIdentifierImpl() const +void String::createPropertyKeyImpl() const { if (!d()->text) d()->simplifyString(); @@ -251,11 +251,10 @@ void Heap::StringOrSymbol::createHashValue() const } PropertyKey StringOrSymbol::toPropertyKey() const { - uint index = asArrayIndex(); - if (index < UINT_MAX) - return PropertyKey::fromArrayIndex(index); - makeIdentifier(); - return identifier(); + if (d()->identifier.isValid()) + return d()->identifier; + createPropertyKey(); + return propertyKey(); } uint String::getLength(const Managed *m) |