aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types/qquickworkerscript.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-12 11:13:03 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-18 13:13:47 +0200
commit16f92ad85cf665d863ded5eeaaa7fc3f90820b3f (patch)
tree74b3477b9d6c023730835f1c478ceb6eaec68a2b /src/qml/types/qquickworkerscript.cpp
parent7d4e61dd824706984030c58684fa844ff9cde251 (diff)
Convert builtin methods to return a ReturnedValue
Change-Id: I6b75adbf53a5be0deab023d2eed98ce2a7915551 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/types/qquickworkerscript.cpp')
-rw-r--r--src/qml/types/qquickworkerscript.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/types/qquickworkerscript.cpp b/src/qml/types/qquickworkerscript.cpp
index 6a7374c09e..07acf13314 100644
--- a/src/qml/types/qquickworkerscript.cpp
+++ b/src/qml/types/qquickworkerscript.cpp
@@ -181,7 +181,7 @@ public:
int m_nextId;
- static QV4::Value sendMessage(QV4::SimpleCallContext *ctx);
+ static QV4::ReturnedValue method_sendMessage(QV4::SimpleCallContext *ctx);
signals:
void stopThread();
@@ -234,7 +234,7 @@ void QQuickWorkerScriptEnginePrivate::WorkerEngine::init()
QV4::FunctionObject *createsendconstructor = createsendscript.run().asFunctionObject();
QV4::Value function = QV4::Value::fromObject(m_v4Engine->newBuiltinFunction(m_v4Engine->rootContext, m_v4Engine->newString(QStringLiteral("sendMessage")),
- QQuickWorkerScriptEnginePrivate::sendMessage));
+ QQuickWorkerScriptEnginePrivate::method_sendMessage));
QV4::ScopedCallData callData(scope, 1);
callData->args[0] = function;
callData->thisObject = global();
@@ -278,7 +278,7 @@ QQuickWorkerScriptEnginePrivate::QQuickWorkerScriptEnginePrivate(QQmlEngine *eng
{
}
-QV4::Value QQuickWorkerScriptEnginePrivate::sendMessage(QV4::SimpleCallContext *ctx)
+QV4::ReturnedValue QQuickWorkerScriptEnginePrivate::method_sendMessage(QV4::SimpleCallContext *ctx)
{
WorkerEngine *engine = (WorkerEngine*)ctx->engine->v8Engine;
@@ -289,12 +289,12 @@ QV4::Value QQuickWorkerScriptEnginePrivate::sendMessage(QV4::SimpleCallContext *
QMutexLocker locker(&engine->p->m_lock);
WorkerScript *script = engine->p->workers.value(id);
if (!script)
- return QV4::Value::undefinedValue();
+ return QV4::Encode::undefined();
if (script->owner)
QCoreApplication::postEvent(script->owner, new WorkerDataEvent(0, data));
- return QV4::Value::undefinedValue();
+ return QV4::Encode::undefined();
}
// Requires handle scope and context scope