path: root/src/qml/jsruntime/qv4object_p.h
diff options
authorSimon Hausmann <>2018-12-21 11:26:45 +0100
committerSimon Hausmann <>2019-03-15 13:04:38 +0000
commita79d1038a14db01037d80b9701a530c3654c7adc (patch)
tree8eaa6e8c20bae26ac47e0d0ec8417f4fe82c7810 /src/qml/jsruntime/qv4object_p.h
parent9921180a44d9097b1b83c2fa7b3f36dbb555140c (diff)
Make object property lookup resolution virtual
This allows sub-classes of Object to have their own lookup resolution and verification logic, instead of squeezing it all into qv4lookup.cpp. The typical fallbacks are still in qv4lookup.cpp though. Task-number: QTBUG-69898 Change-Id: I32a8884982b37e2065090666a7bf05b198f5b7fd Reviewed-by: Ulf Hermann <>
Diffstat (limited to 'src/qml/jsruntime/qv4object_p.h')
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h
index 9f24449c91..c3f1cb2c35 100644
--- a/src/qml/jsruntime/qv4object_p.h
+++ b/src/qml/jsruntime/qv4object_p.h
@@ -375,6 +375,11 @@ public:
bool setProtoFromNewTarget(const Value *newTarget);
+ ReturnedValue resolveLookupGetter(ExecutionEngine *engine, Lookup *lookup) const
+ { return vtable()->resolveLookupGetter(this, engine, lookup); }
+ ReturnedValue resolveLookupSetter(ExecutionEngine *engine, Lookup *lookup, const Value &value)
+ { return vtable()->resolveLookupSetter(this, engine, lookup, value); }
static ReturnedValue virtualGet(const Managed *m, PropertyKey id, const Value *receiver,bool *hasProperty);
static bool virtualPut(Managed *m, PropertyKey id, const Value &value, Value *receiver);
@@ -389,6 +394,8 @@ protected:
static OwnPropertyKeyIterator *virtualOwnPropertyKeys(const Object *m, Value *target);
static qint64 virtualGetLength(const Managed *m);
static ReturnedValue virtualInstanceOf(const Object *typeObject, const Value &var);
+ static ReturnedValue virtualResolveLookupGetter(const Object *object, ExecutionEngine *engine, Lookup *lookup);
+ static bool virtualResolveLookupSetter(Object *object, ExecutionEngine *engine, Lookup *lookup, const Value &value);
// qv4runtime uses this directly
static ReturnedValue checkedInstanceOf(ExecutionEngine *engine, const FunctionObject *typeObject, const Value &var);