aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 2a01a3493b..54cb0e586a 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -2303,8 +2303,7 @@ static inline bool evaluate_error(QV8Engine *engine, const QV4::ValueRef o, cons
QV4::Script program(QV8Engine::getV4(engine)->rootContext, functionSource);
program.inheritContext = true;
- QV4::ExecutionContext *ctx = QV8Engine::getV4(engine)->currentContext();
- QV4::Scope scope(ctx);
+ QV4::Scope scope(QV8Engine::getV4(engine));
QV4::Scoped<QV4::FunctionObject> function(scope, program.run());
if (scope.engine->hasException) {
@@ -2331,8 +2330,7 @@ static inline bool evaluate_value(QV8Engine *engine, const QV4::ValueRef o,
QV4::Script program(QV8Engine::getV4(engine)->rootContext, functionSource);
program.inheritContext = true;
- QV4::ExecutionContext *ctx = QV8Engine::getV4(engine)->currentContext();
- QV4::Scope scope(ctx);
+ QV4::Scope scope(QV8Engine::getV4(engine));
QV4::Scoped<QV4::FunctionObject> function(scope, program.run());
if (scope.engine->hasException) {
@@ -2360,10 +2358,9 @@ static inline QV4::ReturnedValue evaluate(QV8Engine *engine, const QV4::ValueRef
QString functionSource = QLatin1String("(function(object) { return ") +
QLatin1String(source) + QLatin1String(" })");
- QV4::ExecutionContext *ctx = QV8Engine::getV4(engine)->currentContext();
- QV4::Scope scope(ctx);
+ QV4::Scope scope(QV8Engine::getV4(engine));
- QV4::Script program(QV8Engine::getV4(engine)->rootContext, functionSource);
+ QV4::Script program(scope.engine->rootContext, functionSource);
program.inheritContext = true;
QV4::Scoped<QV4::FunctionObject> function(scope, program.run());