diff options
Diffstat (limited to 'src/qml/qml/qqmldelayedcallqueue.cpp')
-rw-r--r-- | src/qml/qml/qqmldelayedcallqueue.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/qml/qqmldelayedcallqueue.cpp b/src/qml/qml/qqmldelayedcallqueue.cpp index 87b6fac10e..1537657e0d 100644 --- a/src/qml/qml/qqmldelayedcallqueue.cpp +++ b/src/qml/qml/qqmldelayedcallqueue.cpp @@ -64,17 +64,17 @@ void QQmlDelayedCallQueue::DelayedFunctionCall::execute(QV4::ExecutionEngine *en QV4::Scope scope(engine); QV4::ArrayObject *array = m_args.as<QV4::ArrayObject>(); + const QV4::FunctionObject *callback = m_function.as<QV4::FunctionObject>(); + Q_ASSERT(callback); const int argCount = array ? array->getLength() : 0; - QV4::ScopedCallData callData(scope, argCount); - callData->thisObject = QV4::Encode::undefined(); + QV4::JSCall jsCall(scope, callback, argCount); + jsCall->thisObject = QV4::Encode::undefined(); for (int i = 0; i < argCount; i++) { - callData->args[i] = array->getIndexed(i); + jsCall->args[i] = array->getIndexed(i); } - const QV4::FunctionObject *callback = m_function.as<QV4::FunctionObject>(); - Q_ASSERT(callback); - callback->call(callData); + jsCall.call(); if (scope.engine->hasException) { QQmlError error = scope.engine->catchExceptionAsQmlError(); |