diff options
Diffstat (limited to 'src/qml/jsruntime/qv4regexpobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4regexpobject.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp index 60a5026772..aa3f1c3fb5 100644 --- a/src/qml/jsruntime/qv4regexpobject.cpp +++ b/src/qml/jsruntime/qv4regexpobject.cpp @@ -142,8 +142,9 @@ void RegExpObject::init(ExecutionEngine *engine) vtbl = &static_vtbl; type = Type_RegExpObject; - Property *lastIndexProperty = insertMember(engine->newIdentifier(QStringLiteral("lastIndex")), - Attr_NotEnumerable|Attr_NotConfigurable); + Scope scope(engine); + ScopedString lastIndex(scope, engine->newIdentifier(QStringLiteral("lastIndex"))); + Property *lastIndexProperty = insertMember(lastIndex, Attr_NotEnumerable|Attr_NotConfigurable); lastIndexProperty->value = Value::fromInt32(0); if (!this->value) return; |