aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4string.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4string.cpp')
-rw-r--r--src/qml/jsruntime/qv4string.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4string.cpp b/src/qml/jsruntime/qv4string.cpp
index 806c37b283..0323f3c1d3 100644
--- a/src/qml/jsruntime/qv4string.cpp
+++ b/src/qml/jsruntime/qv4string.cpp
@@ -129,20 +129,19 @@ void String::destroy(Managed *that)
static_cast<String*>(that)->~String();
}
-ReturnedValue String::get(Managed *m, String *name, bool *hasProperty)
+ReturnedValue String::get(Managed *m, const StringRef name, bool *hasProperty)
{
Scope scope(m->engine());
- ScopedString n(scope, name);
String *that = static_cast<String *>(m);
ExecutionEngine *v4 = m->engine();
- if (name == v4->id_length) {
+ if (name->isEqualTo(v4->id_length)) {
if (hasProperty)
*hasProperty = true;
return Value::fromInt32(that->_text.length()).asReturnedValue();
}
PropertyAttributes attrs;
- Property *pd = v4->stringClass->prototype->__getPropertyDescriptor__(n, &attrs);
+ Property *pd = v4->stringClass->prototype->__getPropertyDescriptor__(name, &attrs);
if (!pd || attrs.isGeneric()) {
if (hasProperty)
*hasProperty = false;