diff options
author | Lars Knoll <[email protected]> | 2013-09-25 10:09:26 +0200 |
---|---|---|
committer | The Qt Project <[email protected]> | 2013-09-28 13:33:08 +0200 |
commit | 0f2cf9074d4f0220f5c707eed478f99334814789 (patch) | |
tree | 685ea2295b8728b3545523e2625a4cf65f39b9ee /src/qml/jsruntime/qv4include.cpp | |
parent | 1ef957834bf9040ccd001fa6d80e483b9b21452c (diff) |
Fix CallContext to not hold arguments on the C stack anymore
Change-Id: I35f46cce4f243d4b8b2bac9244f8fc26836f413b
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4include.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4include.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4include.cpp b/src/qml/jsruntime/qv4include.cpp index d6f01bf369..bde9c23e6b 100644 --- a/src/qml/jsruntime/qv4include.cpp +++ b/src/qml/jsruntime/qv4include.cpp @@ -181,7 +181,7 @@ void QV4Include::finished() */ QV4::ReturnedValue QV4Include::method_include(QV4::SimpleCallContext *ctx) { - if (!ctx->argumentCount) + if (!ctx->callData->argc) return QV4::Encode::undefined(); QV4::ExecutionEngine *v4 = ctx->engine; @@ -192,11 +192,11 @@ QV4::ReturnedValue QV4Include::method_include(QV4::SimpleCallContext *ctx) if (!context || !context->isJSContext) V4THROW_ERROR("Qt.include(): Can only be called from JavaScript files"); - QUrl url(ctx->engine->resolvedUrl(ctx->arguments[0].toQStringNoThrow())); + QUrl url(ctx->engine->resolvedUrl(ctx->callData->args[0].toQStringNoThrow())); QV4::Value callbackFunction = QV4::Value::undefinedValue(); - if (ctx->argumentCount >= 2 && ctx->arguments[1].asFunctionObject()) - callbackFunction = ctx->arguments[1]; + if (ctx->callData->argc >= 2 && ctx->callData->args[1].asFunctionObject()) + callbackFunction = ctx->callData->args[1]; QString localFile = QQmlFile::urlToLocalFileOrQrc(url); |