diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-11-28 10:05:24 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-12-19 18:52:07 +0100 |
commit | 05bf96997c52775f14cfd4e34d25187feec897e0 (patch) | |
tree | dba1cb94f6a318d715343c75d54193bb170bb967 /tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | |
parent | f9d4cd6fd75617b2bddde4ba591b77d1d6b4727b (diff) |
Return Heap::ExecutionContext for globalContext()
Change-Id: Ide7c81735be4662ff45bf268cfe750ff1f784453
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index e966052ce8..b816edda6b 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -2302,10 +2302,9 @@ static inline bool evaluate_error(QV8Engine *engine, const QV4::ValueRef o, cons QString functionSource = QLatin1String("(function(object) { return ") + QLatin1String(source) + QLatin1String(" })"); - QV4::Script program(QV8Engine::getV4(engine)->rootContext(), functionSource); - program.inheritContext = true; - QV4::Scope scope(QV8Engine::getV4(engine)); + QV4::Script program(QV4::ScopedContext(scope, scope.engine->rootContext()), functionSource); + program.inheritContext = true; QV4::Scoped<QV4::FunctionObject> function(scope, program.run()); if (scope.engine->hasException) { @@ -2329,10 +2328,9 @@ static inline bool evaluate_value(QV8Engine *engine, const QV4::ValueRef o, QString functionSource = QLatin1String("(function(object) { return ") + QLatin1String(source) + QLatin1String(" })"); - QV4::Script program(QV8Engine::getV4(engine)->rootContext(), functionSource); - program.inheritContext = true; - QV4::Scope scope(QV8Engine::getV4(engine)); + QV4::Script program(QV4::ScopedContext(scope, scope.engine->rootContext()), functionSource); + program.inheritContext = true; QV4::Scoped<QV4::FunctionObject> function(scope, program.run()); if (scope.engine->hasException) { @@ -2362,7 +2360,7 @@ static inline QV4::ReturnedValue evaluate(QV8Engine *engine, const QV4::ValueRef QV4::Scope scope(QV8Engine::getV4(engine)); - QV4::Script program(scope.engine->rootContext(), functionSource); + QV4::Script program(QV4::ScopedContext(scope, scope.engine->rootContext()), functionSource); program.inheritContext = true; QV4::Scoped<QV4::FunctionObject> function(scope, program.run()); |