diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-11-21 09:17:01 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-12-11 08:40:41 +0100 |
commit | ddfe9defa803fdbfab10ab58b77df242cdb4cedd (patch) | |
tree | b13af2424e8ea466a9de9fece8f2fbb6415ce8b6 /src/qml/jsapi/qjsengine.cpp | |
parent | 254cf16ed4c6007a59a7cd5d64bb621430b3c01d (diff) |
Encapsulate accesses to the root context
Change-Id: I668cef1363a5c1a5c5b9a7e138f3bd0338712eea
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsapi/qjsengine.cpp')
-rw-r--r-- | src/qml/jsapi/qjsengine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp index fba5d1a910..ccf4c47eac 100644 --- a/src/qml/jsapi/qjsengine.cpp +++ b/src/qml/jsapi/qjsengine.cpp @@ -302,7 +302,7 @@ QJSValue QJSEngine::evaluate(const QString& program, const QString& fileName, in QV4::ExecutionEngine *v4 = d->m_v4Engine; QV4::Scope scope(v4); QV4::ExecutionContext *ctx = v4->currentContext(); - if (ctx != v4->rootContext) + if (ctx != v4->rootContext()) ctx = v4->pushGlobalContext(); QV4::ScopedValue result(scope); @@ -314,7 +314,7 @@ QJSValue QJSEngine::evaluate(const QString& program, const QString& fileName, in result = script.run(); if (scope.engine->hasException) result = v4->catchException(); - if (ctx != v4->rootContext) + if (ctx != v4->rootContext()) v4->popContext(); return new QJSValuePrivate(v4, result); } |