diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-25 10:09:26 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-28 13:33:08 +0200 |
commit | 0f2cf9074d4f0220f5c707eed478f99334814789 (patch) | |
tree | 685ea2295b8728b3545523e2625a4cf65f39b9ee /src/qml/jsruntime/qv4qobjectwrapper.cpp | |
parent | 1ef957834bf9040ccd001fa6d80e483b9b21452c (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/jsruntime/qv4qobjectwrapper.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4qobjectwrapper.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index b7a696cc33..876bda3163 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -788,10 +788,10 @@ struct QObjectSlotDispatcher : public QtPrivate::QSlotObjectBase ReturnedValue QObjectWrapper::method_connect(SimpleCallContext *ctx) { - if (ctx->argumentCount == 0) + if (ctx->callData->argc == 0) V4THROW_ERROR("Function.prototype.connect: no arguments given"); - QPair<QObject *, int> signalInfo = extractQtSignal(ctx->thisObject); + QPair<QObject *, int> signalInfo = extractQtSignal(ctx->callData->thisObject); QObject *signalObject = signalInfo.first; int signalIndex = signalInfo.second; @@ -808,11 +808,11 @@ ReturnedValue QObjectWrapper::method_connect(SimpleCallContext *ctx) QV4::ScopedFunctionObject f(scope); QV4::ScopedValue thisObject (scope, QV4::Encode::undefined()); - if (ctx->argumentCount == 1) { - f = ctx->arguments[0]; - } else if (ctx->argumentCount >= 2) { - thisObject = ctx->arguments[0]; - f = ctx->arguments[1]; + if (ctx->callData->argc == 1) { + f = ctx->callData->args[0]; + } else if (ctx->callData->argc >= 2) { + thisObject = ctx->callData->args[0]; + f = ctx->callData->args[1]; } if (!f) @@ -834,10 +834,10 @@ ReturnedValue QObjectWrapper::method_connect(SimpleCallContext *ctx) ReturnedValue QObjectWrapper::method_disconnect(SimpleCallContext *ctx) { - if (ctx->argumentCount == 0) + if (ctx->callData->argc == 0) V4THROW_ERROR("Function.prototype.disconnect: no arguments given"); - QPair<QObject *, int> signalInfo = extractQtSignal(ctx->thisObject); + QPair<QObject *, int> signalInfo = extractQtSignal(ctx->callData->thisObject); QObject *signalObject = signalInfo.first; int signalIndex = signalInfo.second; @@ -853,11 +853,11 @@ ReturnedValue QObjectWrapper::method_disconnect(SimpleCallContext *ctx) QV4::Value functionValue = QV4::Value::undefinedValue(); QV4::Value functionThisValue = QV4::Value::undefinedValue(); - if (ctx->argumentCount == 1) { - functionValue = ctx->arguments[0]; - } else if (ctx->argumentCount >= 2) { - functionThisValue = ctx->arguments[0]; - functionValue = ctx->arguments[1]; + if (ctx->callData->argc == 1) { + functionValue = ctx->callData->args[0]; + } else if (ctx->callData->argc >= 2) { + functionThisValue = ctx->callData->args[0]; + functionValue = ctx->callData->args[1]; } if (!functionValue.asFunctionObject()) |