diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-11 14:36:01 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-18 13:13:21 +0200 |
commit | 002e6105f61269f1474de878ccdb26205e5b226e (patch) | |
tree | ead1d10b7d8aa2537e7073327d9d0d9ce591c995 /tests | |
parent | 1a2a83f80ba4ecc28eba72af57c81bd43a45946c (diff) |
Require a ValueScope for ScopedCallData as well
This brings things more in line with ScopedValue, and
also simplifies cleanup of Scoped values.
Change-Id: If5f1466b4e13c629d56c1e7c638937f61ba48f77
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 260afa2185..caff36cf0d 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -2273,7 +2273,8 @@ static inline bool evaluate_error(QV8Engine *engine, const QV4::Value &o, const QV4::FunctionObject *function = program.run().asFunctionObject(); if (!function) return false; - QV4::ScopedCallData d(ctx->engine, 1); + QV4::ValueScope scope(ctx); + QV4::ScopedCallData d(scope, 1); d->args[0] = o; d->thisObject = engine->global(); function->call(d); @@ -2301,7 +2302,7 @@ static inline bool evaluate_value(QV8Engine *engine, const QV4::Value &o, QV4::ValueScope scope(ctx); QV4::ScopedValue value(scope); QV4::ScopedValue res(scope, result); - QV4::ScopedCallData d(ctx->engine, 1); + QV4::ScopedCallData d(scope, 1); d->args[0] = o; d->thisObject = engine->global(); value = function->call(d); @@ -2326,7 +2327,7 @@ static inline QV4::Value evaluate(QV8Engine *engine, const QV4::Value & o, if (!function) return QV4::Value::emptyValue(); QV4::ValueScope scope(ctx); - QV4::ScopedCallData d(ctx->engine, 1); + QV4::ScopedCallData d(scope, 1); d->args[0] = o; d->thisObject = engine->global(); QV4::ScopedValue value(scope, function->call(d)); |