diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-30 22:41:12 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-02 16:07:33 +0200 |
commit | d49cc03df130353665edd89112fd4e1f3cdab9b6 (patch) | |
tree | cc55f49b6a2bc6b3b94e47fbdebe9d87f4857a07 /src/qml/jsruntime/qv4functionobject.cpp | |
parent | ac8afca822031f3039dce31525a6ab48c741e73b (diff) | |
download | qtdeclarative-d49cc03df130353665edd89112fd4e1f3cdab9b6.tar.gz |
Use SafeValue instead of Value in ScopedValue methods
Change-Id: Ie463efe600d498ce77d4b9e8b48abcfd61c1ab78
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 4 |
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); |