summaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4object_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-06-19 11:50:07 +0200
committerLars Knoll <lars.knoll@qt.io>2018-06-25 07:36:41 +0000
commit4094ce77af45427613e823a2a4d3c6087230d35a (patch)
tree027d8c054435016f1f478790fdcd4ac745ce8048 /src/qml/jsruntime/qv4object_p.h
parent4f5d83acf78c7e3e3f4b89190d6109a4c8fa574d (diff)
Add support for isExtensible in proxy handlers
Change-Id: I580ff0ab33fa58bcd42f6cc500f4a20ee5b05e87 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4object_p.h')
-rw-r--r--src/qml/jsruntime/qv4object_p.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h
index 9354ae0571..a9851984e1 100644
--- a/src/qml/jsruntime/qv4object_p.h
+++ b/src/qml/jsruntime/qv4object_p.h
@@ -177,6 +177,7 @@ struct ObjectVTable
bool (*deleteIndexedProperty)(Managed *m, uint index);
bool (*hasProperty)(const Managed *m, Identifier id);
PropertyAttributes (*getOwnProperty)(Managed *m, Identifier id, Property *p);
+ bool (*isExtensible)(const Managed *);
qint64 (*getLength)(const Managed *m);
void (*advanceIterator)(Managed *m, ObjectIterator *it, Value *name, uint *index, Property *p, PropertyAttributes *attributes);
ReturnedValue (*instanceOf)(const Object *typeObject, const Value &var);
@@ -196,6 +197,7 @@ const QV4::ObjectVTable classname::static_vtbl = \
deleteIndexedProperty, \
hasProperty, \
getOwnProperty, \
+ isExtensible, \
getLength, \
advanceIterator, \
instanceOf \
@@ -301,7 +303,7 @@ struct Q_QML_EXPORT Object: Managed {
}
void insertMember(StringOrSymbol *s, const Property *p, PropertyAttributes attributes);
- bool isExtensible() const { return d()->internalClass->extensible; }
+ bool isExtensible() const { return vtable()->isExtensible(this); }
// Array handling
@@ -438,6 +440,7 @@ protected:
static bool deleteIndexedProperty(Managed *m, uint index);
static bool hasProperty(const Managed *m, Identifier id);
static PropertyAttributes getOwnProperty(Managed *m, Identifier id, Property *p);
+ static bool isExtensible(const Managed *m);
static void advanceIterator(Managed *m, ObjectIterator *it, Value *name, uint *index, Property *p, PropertyAttributes *attributes);
static qint64 getLength(const Managed *m);
static ReturnedValue instanceOf(const Object *typeObject, const Value &var);