aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4functionobject.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-06-21 14:11:41 +0200
committerUlf Hermann <ulf.hermann@qt.io>2023-06-26 20:42:49 +0200
commit9eb6240ebd0b7f52ec49aba757a8c355b25203e0 (patch)
treecff2b25ad5798206830bb1cb1ea1c036610634d6 /src/qml/jsruntime/qv4functionobject.cpp
parenta3389d6bf238c46816fd1133c1258102e36c4b10 (diff)
QML: Improve the JS-to-JS type check when enforcing signatures
We do not have to coerce via the C++ type. Rather, we match the JavaScript representations of the types and coerce as needed. Task-number: QTBUG-113527 Change-Id: Id5c30cd46293f2d7aedd699f141a9fe19511b622 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index a9cd25d569..45ca75008c 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -545,8 +545,9 @@ ReturnedValue ArrowFunction::virtualCall(const QV4::FunctionObject *fo, const Va
});
case Function::JsTyped:
return QV4::coerceAndCall(
- fo->engine(), function->aotCompiledFunction, thisObject, argv, argc,
- [fo](const Value *thisObject, const Value *argv, int argc) {
+ fo->engine(), function->jsTypedFunction, function->compiledFunction,
+ thisObject, argv, argc,
+ [fo](const Value *thisObject, const Value *argv, int argc) {
return qfoDoCall(fo, thisObject, argv, argc);
});
default: