diff options
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index 9a3aa331dc..9b502a0927 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -111,7 +111,7 @@ FunctionObject::FunctionObject(InternalClass *ic) { needsActivation = false; strictMode = false; - memberData[Index_Prototype].value = Encode::undefined(); + memberData[Index_Prototype] = Encode::undefined(); } FunctionObject::~FunctionObject() @@ -130,11 +130,10 @@ 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.asReturnedValue(); + proto->memberData[Index_ProtoConstructor] = this->asReturnedValue(); + memberData[Index_Prototype] = proto.asReturnedValue(); } else { - // ### Empty or undefined? - memberData[Index_Prototype].value = Encode::undefined(); + memberData[Index_Prototype] = Encode::undefined(); } ScopedValue v(s, n.asReturnedValue()); |