aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4object_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-11-27 08:56:03 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-12-17 11:01:10 +0100
commit9d2a5ea28adf8ab35212ca8a71b479bc50960e3d (patch)
treec59e0799ccf55f832f1e2bde02e256ef62ac2d19 /src/qml/jsruntime/qv4object_p.h
parenta58893eeda6bd48f41bdfa19eda147343be5f81e (diff)
Return a Heap::Object in Object::prototype()
Change-Id: Ice0265ae558ba14497421a5bbf25ee9db76adab5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4object_p.h')
-rw-r--r--src/qml/jsruntime/qv4object_p.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h
index fed05893ca..ade5383932 100644
--- a/src/qml/jsruntime/qv4object_p.h
+++ b/src/qml/jsruntime/qv4object_p.h
@@ -51,6 +51,9 @@ struct Object : Base {
}
Object(InternalClass *internal, QV4::Object *prototype);
+ const Property *propertyAt(uint index) const { return reinterpret_cast<const Property *>(memberData->data + index); }
+ Property *propertyAt(uint index) { return reinterpret_cast<Property *>(memberData->data + index); }
+
Heap::Object *prototype;
MemberData *memberData;
ArrayData *arrayData;
@@ -71,12 +74,11 @@ struct Q_QML_EXPORT Object: Managed {
Heap::ArrayData *arrayData() const { return d()->arrayData; }
void setArrayData(ArrayData *a) { d()->arrayData = a->d(); }
- const Property *propertyAt(uint index) const { return reinterpret_cast<const Property *>(memberData()->data + index); }
- Property *propertyAt(uint index) { return reinterpret_cast<Property *>(memberData()->data + index); }
+ const Property *propertyAt(uint index) const { return d()->propertyAt(index); }
+ Property *propertyAt(uint index) { return d()->propertyAt(index); }
const ObjectVTable *vtable() const { return reinterpret_cast<const ObjectVTable *>(internalClass()->vtable); }
- // ### GC
- Object *prototype() const { return reinterpret_cast<Object *>(d()->prototype); }
+ Heap::Object *prototype() const { return d()->prototype; }
bool setPrototype(Object *proto);
Property *__getOwnProperty__(String *name, PropertyAttributes *attrs = 0);