diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-02-03 16:28:17 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-03-09 08:58:46 +0000 |
commit | df3256b1f1eaa3ff9137ad1da36508365d978a8a (patch) | |
tree | a9d7fdb2dc49efbfd4d4809a8525b864ffb2b60c /src/qml/jsruntime/qv4regexpobject_p.h | |
parent | ae92e34a0c3e8a2df88a854081678fa35c4f6b42 (diff) |
Go through proper set() functions when writing to MemberData
This is required, so we only have to add the write barrier
in one place.
Change-Id: I4e8bde823b30ad18f043312ac3f1ed46597b91a7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4regexpobject_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4regexpobject_p.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4regexpobject_p.h b/src/qml/jsruntime/qv4regexpobject_p.h index c2eeb32b88..0fcfe93135 100644 --- a/src/qml/jsruntime/qv4regexpobject_p.h +++ b/src/qml/jsruntime/qv4regexpobject_p.h @@ -128,7 +128,15 @@ struct RegExpObject: Object { void initProperties(); - Value *lastIndexProperty(); + int lastIndex() const { + Q_ASSERT(Index_LastIndex == internalClass()->find(engine()->id_lastIndex())); + return propertyData(Index_LastIndex)->toInt32(); + } + void setLastIndex(int index) { + Q_ASSERT(Index_LastIndex == internalClass()->find(engine()->id_lastIndex())); + return setProperty(Index_LastIndex, Primitive::fromInt32(index)); + } + QRegExp toQRegExp() const; QString toString() const; QString source() const; |