aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r--src/qml/jsruntime/qv4engine.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index e6a4932c2d..af87ee2a45 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -163,6 +163,11 @@ ExecutionEngine::ExecutionEngine(QQmlJS::EvalISelFactory *factory)
FunctionPrototype *functionPrototype = new (memoryManager) FunctionPrototype(objectClass);
functionClass = emptyClass->changePrototype(functionPrototype);
+ uint index;
+ functionWithProtoClass = functionClass->addMember(id_prototype, Attr_NotEnumerable|Attr_NotConfigurable, &index);
+ Q_ASSERT(index == FunctionObject::Index_Prototype);
+ protoClass = objectClass->addMember(id_constructor, Attr_NotEnumerable, &index);
+ Q_ASSERT(index == FunctionObject::Index_ProtoConstructor);
RegExpPrototype *regExpPrototype = new (memoryManager) RegExpPrototype(objectClass);
regExpClass = emptyClass->changePrototype(regExpPrototype);