From 4e1512baf6d1220c9e89c8a36f16de400bb1b519 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 5 Dec 2017 10:45:14 +0100 Subject: Convert more builtin functions to use the new calling convention Convert most of the methods used QML objects to the new calling convention. Converted IndexedBuiltinFunction to do the same. Change-Id: I41b26042c2f56f24988485b06e8ccd214e2573c0 Reviewed-by: Simon Hausmann --- src/qml/types/qquickworkerscript.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/qml/types/qquickworkerscript.cpp') diff --git a/src/qml/types/qquickworkerscript.cpp b/src/qml/types/qquickworkerscript.cpp index 346f2e6a61..43ba21afad 100644 --- a/src/qml/types/qquickworkerscript.cpp +++ b/src/qml/types/qquickworkerscript.cpp @@ -186,7 +186,7 @@ public: int m_nextId; - static QV4::ReturnedValue method_sendMessage(const QV4::BuiltinFunction *, QV4::CallData *callData); + static QV4::ReturnedValue method_sendMessage(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc); signals: void stopThread(); @@ -293,15 +293,15 @@ QQuickWorkerScriptEnginePrivate::QQuickWorkerScriptEnginePrivate(QQmlEngine *eng { } -QV4::ReturnedValue QQuickWorkerScriptEnginePrivate::method_sendMessage(const QV4::BuiltinFunction *b, - QV4::CallData *callData) +QV4::ReturnedValue QQuickWorkerScriptEnginePrivate::method_sendMessage(const QV4::FunctionObject *b, + const QV4::Value *, const QV4::Value *argv, int argc) { QV4::Scope scope(b); - WorkerEngine *engine = (WorkerEngine*)scope.engine->v8Engine; + WorkerEngine *engine = static_cast(scope.engine->v8Engine); - int id = callData->argc() > 1 ? callData->args[1].toInt32() : 0; + int id = argc > 1 ? argv[1].toInt32() : 0; - QV4::ScopedValue v(scope, callData->argument(2)); + QV4::ScopedValue v(scope, argc > 2 ? argv[2] : QV4::Primitive::undefinedValue()); QByteArray data = QV4::Serialize::serialize(v, scope.engine); QMutexLocker locker(&engine->p->m_lock); -- cgit v1.2.3