diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-08-03 16:26:23 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-08-03 19:11:32 +0000 |
commit | 014d8595377e1e98637a42e65b01b758b54e2819 (patch) | |
tree | 27a0f7cae25bb1395aca5aa7dae52e012cbe694c /src/qml/jsruntime/qv4runtime.cpp | |
parent | 4d34d6fe3bdf666b130ad06b0baf9d6b5b4fc39f (diff) |
Fix crash in language/statements/class/syntax/class-body-method-definition-super-property.js with JIT
CallValue was changed to pass undefined as the this object, instead of a
null pointer. This also needs to be done from the other call site used
by the JIT, Runtime::method_callValue.
Amends commit d31541fd9d7d52ef3eae29e7e5d36733d7f55375
Change-Id: I0e2c2542ae96a88bb7e6e24d012f7f7fe72aeb80
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index abfc3e730b..87d8c70061 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -1264,7 +1264,8 @@ ReturnedValue Runtime::method_callValue(ExecutionEngine *engine, const Value &fu { if (!func.isFunctionObject()) return engine->throwTypeError(QStringLiteral("%1 is not a function").arg(func.toQStringNoThrow())); - return static_cast<const FunctionObject &>(func).call(nullptr, argv, argc); + Value undef = Primitive::undefinedValue(); + return static_cast<const FunctionObject &>(func).call(&undef, argv, argc); } ReturnedValue Runtime::method_callQmlScopeObjectProperty(ExecutionEngine *engine, Value *base, |