aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvmemetaobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-05 13:22:23 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-11 13:01:50 +0200
commit6e8e5d16e16d6ee683a5c06a24f8f202ed5239ff (patch)
treefa8e710ad0ee4ff6cc9738fa717883c74d452b95 /src/qml/qml/qqmlvmemetaobject.cpp
parent736afb8e9b3694efb8ca1fa8f3a8eeeaef530da2 (diff)
Move CallData onto the JS stack
Change-Id: I22e853acfd2da337344b581bb0412c5f9930c510 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlvmemetaobject.cpp')
-rw-r--r--src/qml/qml/qqmlvmemetaobject.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp
index 3d2d54ccfa..0079b9580f 100644
--- a/src/qml/qml/qqmlvmemetaobject.cpp
+++ b/src/qml/qml/qqmlvmemetaobject.cpp
@@ -55,6 +55,7 @@
#include <private/qv4object_p.h>
#include <private/qv4variantobject_p.h>
#include <private/qv4functionobject_p.h>
+#include <private/qv4scopedvalue_p.h>
QT_BEGIN_NAMESPACE
@@ -926,16 +927,16 @@ int QQmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a)
QQmlVMEMetaData::MethodData *data = metaData->methodData() + id;
- CALLDATA(data->parameterCount);
- d.thisObject = ep->v8engine()->global();
+ QV4::ScopedCallData callData(function->engine(), data->parameterCount);
+ callData->thisObject = ep->v8engine()->global();
for (int ii = 0; ii < data->parameterCount; ++ii)
- d.args[ii] = ep->v8engine()->fromVariant(*(QVariant *)a[ii + 1]);
+ callData->args[ii] = ep->v8engine()->fromVariant(*(QVariant *)a[ii + 1]);
QV4::Value result = QV4::Value::undefinedValue();
QV4::ExecutionContext *ctx = function->engine()->current;
try {
- result = function->call(d);
+ result = function->call(callData);
if (a[0]) *(QVariant *)a[0] = ep->v8engine()->toVariant(result, 0);
} catch (QV4::Exception &e) {
e.accept(ctx);