aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4object.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-06-19 14:15:12 +0200
committerLars Knoll <lars.knoll@qt.io>2018-06-26 10:03:43 +0000
commit89f585157af905d45012dbd9c079c48491e5211d (patch)
treebb0f3e34d9f030ce71634752ff9b0a9834adf5f3 /src/qml/jsruntime/qv4object.cpp
parent1e7cd1acf64e13096231a25736ee227cb3b43b8b (diff)
Move special handling of getOwnProperty for StringObject where it belongs
Move the code into a virtual method of StringObject, bringing us closer in line with the ES7 spec. Change-Id: Iaf460f5a5517fe059a30be8c403d71625453b80a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4object.cpp')
-rw-r--r--src/qml/jsruntime/qv4object.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp
index dff7555061..ba6d8f9c77 100644
--- a/src/qml/jsruntime/qv4object.cpp
+++ b/src/qml/jsruntime/qv4object.cpp
@@ -983,14 +983,6 @@ PropertyAttributes Object::getOwnProperty(Managed *m, Identifier id, Property *p
if (o->arrayData()->getProperty(index, p, &attrs))
return attrs;
}
- if (o->isStringObject()) {
- if (index >= static_cast<const StringObject *>(m)->length())
- return Attr_Invalid;
- attrs = Attr_NotConfigurable|Attr_NotWritable;
- if (p)
- p->value = static_cast<StringObject *>(o)->getIndex(index);
- return attrs;
- }
} else {
Q_ASSERT(id.asHeapObject());