From 45f7120d42f628e86ae2bf3bd2789fdb190490e0 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 8 May 2014 22:27:23 +0200 Subject: Convert regexps Change-Id: I5b62a265a7ce363a16b1e14ae93cadbb1ab0cb5b Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4functionobject.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/qml/jsruntime/qv4functionobject.cpp') 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 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() -- cgit v1.2.3