aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4qobjectwrapper.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-03-12 14:57:24 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-03-17 13:10:16 +0100
commitb0e9c83f99aa7090c82b7c55894f5e264b74608a (patch)
tree39a11795b7d17483ce05be5b23c380864eb9bb29 /src/qml/jsruntime/qv4qobjectwrapper.cpp
parent2fab46e711abfc04edd1791d050722d1fbfbc7d2 (diff)
Don't store the scope in JSCallData
We only need it when generating CallData, or when filling in any thisObject or arguments that weren't provided. Provide a constructor that expects thisObject and arguments to be pre-allocated and one that allocates them in a scope passed as argument. Change-Id: Iddfba63f4dbc5b09e2b33fb22a94eea88f515902 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4qobjectwrapper.cpp')
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index 41a57e36c9..f8268849ff 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -2205,8 +2205,8 @@ ReturnedValue QObjectMethod::callInternal(const Value *thisObject, const Value *
}
Scope scope(v4);
- JSCallData cData(scope, argc, argv, thisObject);
- CallData *callData = cData.callData();
+ JSCallData cData(thisObject, argv, argc);
+ CallData *callData = cData.callData(scope);
auto method = d()->methods[0];
@@ -2307,8 +2307,8 @@ ReturnedValue QMetaObjectWrapper::constructInternal(const Value *argv, int argc)
Scope scope(v4);
Scoped<QObjectWrapper> object(scope);
- JSCallData cData(scope, argc, argv);
- CallData *callData = cData.callData();
+ JSCallData cData(scope.alloc(), argv, argc);
+ CallData *callData = cData.callData(scope);
const QQmlObjectOrGadget objectOrGadget(mo);