From 1102cefcd75b250d4b42673b8a606d167cb15048 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 30 Aug 2018 22:30:50 +0200 Subject: Fix thisObject when calling super properties Change-Id: Ia520d43ea2c29c16cfc8ffc86a32187a78848502 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4runtime.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/qml/jsruntime/qv4runtime.cpp') diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index 1a201a5d37..8064e64e93 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -1310,6 +1310,13 @@ ReturnedValue Runtime::method_callValue(ExecutionEngine *engine, const Value &fu return static_cast(func).call(&undef, argv, argc); } +ReturnedValue Runtime::method_callWithReceiver(ExecutionEngine *engine, const Value &func, const Value *thisObject, Value *argv, int argc) +{ + if (!func.isFunctionObject()) + return engine->throwTypeError(QStringLiteral("%1 is not a function").arg(func.toQStringNoThrow())); + return static_cast(func).call(thisObject, argv, argc); +} + ReturnedValue Runtime::method_callQmlScopeObjectProperty(ExecutionEngine *engine, Value *base, int propertyIndex, Value *argv, int argc) { -- cgit v1.2.3