aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4script.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-30 14:38:01 +0200
committerLars Knoll <lars.knoll@qt.io>2017-09-01 12:30:30 +0000
commit50828bc6ed9112956170a68dffe72431a21fddd9 (patch)
tree60cd60e614516fb77fe27fe7dc9a4f453b6e2b31 /src/qml/jsruntime/qv4script.cpp
parent85fe2814a1397a17804d8eace4a70e5b7df854b6 (diff)
Use the context member in CallData
Store the current context in the context member instead of passing it along as arguments. Change-Id: If3dd0d32eddb2a02bcbf65fe6e8d15142403170e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4script.cpp')
-rw-r--r--src/qml/jsruntime/qv4script.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index 23dfd3fc89..d5f08041f6 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -153,12 +153,14 @@ ReturnedValue Script::run()
QV4::ScopedCallData cData(scope);
cData->thisObject = engine->globalObject;
- return vmFunction->execute(scope->d(), cData);
+ cData->context = *scope;
+ return vmFunction->execute(cData);
} else {
Scoped<QmlContext> qml(valueScope, qmlContext.value());
ScopedCallData callData(valueScope);
callData->thisObject = Primitive::undefinedValue();
- return vmFunction->call(qml->d(), callData);
+ callData->context = *qml;
+ return vmFunction->call(callData);
}
}