diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2014-11-18 21:22:44 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-12-20 15:16:39 +0100 |
commit | e7b66a60584b3fcb1436a7dbe8396b71cb69fe1b (patch) | |
tree | 4ff62f582408df5e948063c18420f61b262c7334 /src/qml/jsapi/qjsengine.cpp | |
parent | 74c658bb631fd5bab433b9867ff2e568a56ec082 (diff) |
Make Managed inherit Value
This completes the first milestone towards being able to move
objects across the GC heap.
Change-Id: I8e6ce90254ea767188a31f0dc85b133534c87eb0
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 e25d166172..e4daa64674 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::ScopedContext ctx(scope, v4->currentContext()); - if (ctx != v4->rootContext()) + if (ctx->d() != 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->d() != v4->rootContext()) v4->popContext(); return new QJSValuePrivate(v4, result); } |