aboutsummaryrefslogtreecommitdiffstats
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.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index 791ff0f3b3..38b2dcbb9e 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -169,6 +169,7 @@ void FunctionObject::init(String *n, bool createProto)
d()->needsActivation = true;
d()->strictMode = false;
+ memberData().ensureIndex(s.engine, Index_Prototype);
if (createProto) {
Scoped<Object> proto(s, scope()->d()->engine->newObject(scope()->d()->engine->protoClass));
proto->memberData()[Index_ProtoConstructor] = this->asReturnedValue();
@@ -178,7 +179,7 @@ void FunctionObject::init(String *n, bool createProto)
}
ScopedValue v(s, n);
- defineReadonlyProperty(scope()->d()->engine->id_name, v);
+ defineReadonlyProperty(s.engine->id_name, v);
}
ReturnedValue FunctionObject::name()