aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4objectproto.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-11 13:55:01 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-18 13:13:18 +0200
commit1a2a83f80ba4ecc28eba72af57c81bd43a45946c (patch)
treec2e4eb4d9bb57873ca340f6bbbf2342b36c91452 /src/qml/jsruntime/qv4objectproto.cpp
parent826550af450b39f47a3c00ec316acf1e317f12c6 (diff)
Use a ReturnedValue for Managed::call()
Change-Id: Ief2d75e9789dd367c603d90dc0fe5316a0d055e3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4objectproto.cpp')
-rw-r--r--src/qml/jsruntime/qv4objectproto.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp
index cba8141257..5dc4d333ce 100644
--- a/src/qml/jsruntime/qv4objectproto.cpp
+++ b/src/qml/jsruntime/qv4objectproto.cpp
@@ -93,11 +93,11 @@ Value ObjectCtor::construct(Managed *that, CallData *callData)
return Value::fromReturnedValue(__qmljs_to_object(v4->current, ValueRef(&callData->args[0])));
}
-Value ObjectCtor::call(Managed *m, CallData *callData)
+ReturnedValue ObjectCtor::call(Managed *m, CallData *callData)
{
if (!callData->argc || callData->args[0].isUndefined() || callData->args[0].isNull())
- return Value::fromObject(m->engine()->newObject());
- return Value::fromReturnedValue(__qmljs_to_object(m->engine()->current, ValueRef(&callData->args[0])));
+ return Value::fromObject(m->engine()->newObject()).asReturnedValue();
+ return __qmljs_to_object(m->engine()->current, ValueRef(&callData->args[0]));
}
void ObjectPrototype::init(ExecutionContext *ctx, const Value &ctor)
@@ -388,7 +388,7 @@ Value ObjectPrototype::method_toLocaleString(SimpleCallContext *ctx)
ctx->throwTypeError();
ScopedCallData callData(ctx->engine, 0);
callData->thisObject = Value::fromObject(o);
- return f->call(callData);
+ return Value::fromReturnedValue(f->call(callData));
}
Value ObjectPrototype::method_valueOf(SimpleCallContext *ctx)