diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-11-21 16:41:32 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-04 09:45:50 +0100 |
commit | 9306c05dd152511b8b938d7899a7bdf1aeb8d1c2 (patch) | |
tree | 514b6cda632244d7f9e7fdb1af143da05b7b1ce0 /src/qml/jsruntime/qv4include.cpp | |
parent | 0f32303e5cc9c539aa8698cab2b8cc2e946d885a (diff) |
Encapsulate the current context and fix it's usage
Encapsulate accesses to the current context, and rework
the way we push and pop this context from the context
stack.
Largely a cleanup, but simplifies the code in the long term
Change-Id: I409e378490d0ab027be6a4c01a4031b2ea35c51d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4include.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4include.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4include.cpp b/src/qml/jsruntime/qv4include.cpp index 8f2548064a..d0e0e9413b 100644 --- a/src/qml/jsruntime/qv4include.cpp +++ b/src/qml/jsruntime/qv4include.cpp @@ -108,7 +108,7 @@ void QV4Include::callback(const QV4::ValueRef callback, const QV4::ValueRef stat if (!f) return; - QV4::ExecutionContext *ctx = v4->current; + QV4::ExecutionContext *ctx = v4->currentContext(); QV4::ScopedCallData callData(scope, 1); callData->thisObject = v4->globalObject->asReturnedValue(); callData->args[0] = status; @@ -153,7 +153,7 @@ void QV4Include::finished() QV4::ScopedObject qmlglobal(scope, m_qmlglobal.value()); QV4::Script script(v4, qmlglobal, code, m_url.toString()); - QV4::ExecutionContext *ctx = v4->current; + QV4::ExecutionContext *ctx = v4->currentContext(); QV4::ScopedString status(scope, v4->newString(QStringLiteral("status"))); script.parse(); if (!scope.engine->hasException) @@ -220,7 +220,7 @@ QV4::ReturnedValue QV4Include::method_include(QV4::CallContext *ctx) QV4::Script script(v4, qmlcontextobject, code, url.toString()); - QV4::ExecutionContext *ctx = v4->current; + QV4::ExecutionContext *ctx = v4->currentContext(); script.parse(); if (!v4->hasException) script.run(); |