diff options
author | Lars Knoll <[email protected]> | 2018-08-30 22:30:50 +0200 |
---|---|---|
committer | Lars Knoll <[email protected]> | 2018-08-31 06:08:51 +0000 |
commit | 1102cefcd75b250d4b42673b8a606d167cb15048 (patch) | |
tree | 34887646d0cb29ba87eac5d563776676bc8f249f /src/qml/jsruntime/qv4runtime.cpp | |
parent | ac3a9fd8f352b1d717334d16111d22d6c155e4e2 (diff) |
Fix thisObject when calling super properties
Change-Id: Ia520d43ea2c29c16cfc8ffc86a32187a78848502
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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<const FunctionObject &>(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<const FunctionObject &>(func).call(thisObject, argv, argc); +} + ReturnedValue Runtime::method_callQmlScopeObjectProperty(ExecutionEngine *engine, Value *base, int propertyIndex, Value *argv, int argc) { |