aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-11-13 12:14:09 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-11-21 16:36:24 +0100
commitb943d80dd90dec1a8b7802b826ad89e924cead05 (patch)
treea7edf71a76757a6dcb623e4929419a57a58a5523 /tests/auto/qml/qqmlecmascript
parentcf7bd35a93f220cb1348f7654df9c6f27b590790 (diff)
Remove the executioncontext in a few more places where it's not needed
Change-Id: I4c92c7bc9d94d8265e306f45d863fdc080a5e2a6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript')
-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());