diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-11 15:09:25 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-18 13:13:30 +0200 |
commit | 8d26084ae56ba5aedd73ab733553dbf9cb3eb672 (patch) | |
tree | c0c14b3fdb87bdb23d5612de77605b98aa03dd52 /src/qml/jsruntime/qv4objectproto.cpp | |
parent | 4691396f96cf8468a9ee4fbb339cc94e339928a7 (diff) |
Use ReturnedValue for Managed::construct()
Change-Id: I9e702d60c4e1b7ba19a699ff7a8d53876d6cd5f7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4objectproto.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4objectproto.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp index b851cc3903..37becf8deb 100644 --- a/src/qml/jsruntime/qv4objectproto.cpp +++ b/src/qml/jsruntime/qv4objectproto.cpp @@ -79,7 +79,7 @@ ObjectCtor::ObjectCtor(ExecutionContext *scope) vtbl = &static_vtbl; } -Value ObjectCtor::construct(Managed *that, CallData *callData) +ReturnedValue ObjectCtor::construct(Managed *that, CallData *callData) { ObjectCtor *ctor = static_cast<ObjectCtor *>(that); ExecutionEngine *v4 = that->engine(); @@ -88,9 +88,9 @@ Value ObjectCtor::construct(Managed *that, CallData *callData) Value proto = ctor->get(v4->id_prototype); if (proto.isObject()) obj->setPrototype(proto.objectValue()); - return Value::fromObject(obj); + return Value::fromObject(obj).asReturnedValue(); } - return Value::fromReturnedValue(__qmljs_to_object(v4->current, ValueRef(&callData->args[0]))); + return Value::fromReturnedValue(__qmljs_to_object(v4->current, ValueRef(&callData->args[0]))).asReturnedValue(); } ReturnedValue ObjectCtor::call(Managed *m, CallData *callData) |