aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmljavascriptexpression.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/qml/qqmljavascriptexpression.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/qml/qqmljavascriptexpression.cpp')
-rw-r--r--src/qml/qml/qqmljavascriptexpression.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp
index 037b82cdff..e61c8f551c 100644
--- a/src/qml/qml/qqmljavascriptexpression.cpp
+++ b/src/qml/qml/qqmljavascriptexpression.cpp
@@ -227,8 +227,9 @@ QV4::ReturnedValue QQmlJavaScriptExpression::evaluate(QV4::CallData *callData, b
callData->thisObject = value;
}
- QV4::ExecutionContext *outer = static_cast<QV4::ExecutionContext *>(m_qmlScope.valueRef());
- result = v4Function->call(outer->d(), callData);
+ Q_ASSERT(m_qmlScope.valueRef());
+ callData->context = *m_qmlScope.valueRef();
+ result = v4Function->call(callData);
if (scope.hasException()) {
if (watcher.wasDeleted())