summaryrefslogtreecommitdiff
path: root/src/qml/jsruntime/qv4functionobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index 11580b00c4..7ef0b96f17 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -144,7 +144,7 @@ void FunctionObject::init(const StringRef n, bool createProto)
if (createProto) {
Scoped<Object> proto(s, scope->engine->newObject(scope->engine->protoClass));
proto->memberData[Index_ProtoConstructor].value = this->asReturnedValue();
- memberData[Index_Prototype].value = proto.asValue();
+ memberData[Index_Prototype].value = proto.asReturnedValue();
}
ScopedValue v(s, n.asReturnedValue());
@@ -443,7 +443,7 @@ ReturnedValue ScriptFunction::construct(Managed *that, CallData *callData)
ScopedObject obj(scope, v4->newObject(ic));
ExecutionContext *context = v4->current;
- callData->thisObject = obj.asValue();
+ callData->thisObject = obj.asReturnedValue();
ExecutionContext *ctx = context->newCallContext(f.getPointer(), callData);
ScopedValue result(scope);