aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcomponent.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-25 10:09:26 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-28 13:33:08 +0200
commit0f2cf9074d4f0220f5c707eed478f99334814789 (patch)
tree685ea2295b8728b3545523e2625a4cf65f39b9ee /src/qml/qml/qqmlcomponent.cpp
parent1ef957834bf9040ccd001fa6d80e483b9b21452c (diff)
Fix CallContext to not hold arguments on the C stack anymore
Change-Id: I35f46cce4f243d4b8b2bac9244f8fc26836f413b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcomponent.cpp')
-rw-r--r--src/qml/qml/qqmlcomponent.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index 692d40b418..de1114a15e 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -1424,7 +1424,8 @@ QQmlComponentExtension::QQmlComponentExtension(QV8Engine *engine)
QV4::ReturnedValue QmlIncubatorObject::method_get_object(QV4::SimpleCallContext *ctx)
{
- QmlIncubatorObject *o = ctx->thisObject.as<QmlIncubatorObject>();
+ QV4::Scope scope(ctx);
+ QV4::Scoped<QmlIncubatorObject> o(scope, ctx->callData->thisObject.as<QmlIncubatorObject>());
if (!o)
ctx->throwTypeError();
@@ -1433,7 +1434,8 @@ QV4::ReturnedValue QmlIncubatorObject::method_get_object(QV4::SimpleCallContext
QV4::ReturnedValue QmlIncubatorObject::method_forceCompletion(QV4::SimpleCallContext *ctx)
{
- QmlIncubatorObject *o = ctx->thisObject.as<QmlIncubatorObject>();
+ QV4::Scope scope(ctx);
+ QV4::Scoped<QmlIncubatorObject> o(scope, ctx->callData->thisObject.as<QmlIncubatorObject>());
if (!o)
ctx->throwTypeError();
@@ -1444,7 +1446,8 @@ QV4::ReturnedValue QmlIncubatorObject::method_forceCompletion(QV4::SimpleCallCon
QV4::ReturnedValue QmlIncubatorObject::method_get_status(QV4::SimpleCallContext *ctx)
{
- QmlIncubatorObject *o = ctx->thisObject.as<QmlIncubatorObject>();
+ QV4::Scope scope(ctx);
+ QV4::Scoped<QmlIncubatorObject> o(scope, ctx->callData->thisObject.as<QmlIncubatorObject>());
if (!o)
ctx->throwTypeError();
@@ -1453,7 +1456,8 @@ QV4::ReturnedValue QmlIncubatorObject::method_get_status(QV4::SimpleCallContext
QV4::ReturnedValue QmlIncubatorObject::method_get_statusChanged(QV4::SimpleCallContext *ctx)
{
- QmlIncubatorObject *o = ctx->thisObject.as<QmlIncubatorObject>();
+ QV4::Scope scope(ctx);
+ QV4::Scoped<QmlIncubatorObject> o(scope, ctx->callData->thisObject.as<QmlIncubatorObject>());
if (!o)
ctx->throwTypeError();
@@ -1462,11 +1466,12 @@ QV4::ReturnedValue QmlIncubatorObject::method_get_statusChanged(QV4::SimpleCallC
QV4::ReturnedValue QmlIncubatorObject::method_set_statusChanged(QV4::SimpleCallContext *ctx)
{
- QmlIncubatorObject *o = ctx->thisObject.as<QmlIncubatorObject>();
- if (!o || ctx->argumentCount < 1)
+ QV4::Scope scope(ctx);
+ QV4::Scoped<QmlIncubatorObject> o(scope, ctx->callData->thisObject.as<QmlIncubatorObject>());
+ if (!o || ctx->callData->argc < 1)
ctx->throwTypeError();
- o->m_statusChanged = ctx->arguments[0];
+ o->m_statusChanged = ctx->callData->args[0];
return QV4::Encode::undefined();
}