aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4runtime.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-11 13:10:42 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-18 13:13:16 +0200
commit826550af450b39f47a3c00ec316acf1e317f12c6 (patch)
tree58fcb1dbb91ea981a6a1cfde61a92b4d4d34eff9 /src/qml/jsruntime/qv4runtime.cpp
parentd642438b7641ea2ea5416b59327c8f3baf531aa7 (diff)
Adjust return values to use ReturnedValue
Change-Id: I03822d360ad90cc659da66252439472ecb1a52bb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index 6c3276cd86..6771ee752f 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -782,7 +782,7 @@ ReturnedValue __qmljs_get_property(ExecutionContext *ctx, const ValueRef object,
ReturnedValue __qmljs_get_activation_property(ExecutionContext *ctx, String *name)
{
- return ctx->getProperty(name).asReturnedValue();
+ return ctx->getProperty(name);
}
uint __qmljs_equal_helper(const ValueRef x, const ValueRef y)
@@ -949,13 +949,14 @@ ReturnedValue __qmljs_call_global_lookup(ExecutionContext *context, uint index,
ReturnedValue __qmljs_call_activation_property(ExecutionContext *context, String *name, CallDataRef callData)
{
Q_ASSERT(callData->thisObject.isUndefined());
+ ValueScope scope(context);
Object *base;
- Value func = context->getPropertyAndBase(name, &base);
+ ScopedValue func(scope, context->getPropertyAndBase(name, &base));
if (base)
callData->thisObject = Value::fromObject(base);
- FunctionObject *o = func.asFunctionObject();
+ FunctionObject *o = func->asFunctionObject();
if (!o) {
QString objectAsString = QStringLiteral("[null]");
if (base)
@@ -1048,8 +1049,9 @@ ReturnedValue __qmljs_construct_global_lookup(ExecutionContext *context, uint in
ReturnedValue __qmljs_construct_activation_property(ExecutionContext *context, String *name, CallDataRef callData)
{
- Value func = context->getProperty(name);
- Object *f = func.asObject();
+ ValueScope scope(context);
+ ScopedValue func(scope, context->getProperty(name));
+ Object *f = func->asObject();
if (!f)
context->throwTypeError();