diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-01-31 15:00:06 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-03-09 08:58:37 +0000 |
commit | 9242e5a685695356b2c9101a5e1642a726a6fede (patch) | |
tree | aa01e0e116517592cc0529ad4de11f2e9ed3924d /src/qml/jsruntime/qv4regexpobject.cpp | |
parent | 91714e004e0c91527e7049ff43565dda682fc2bd (diff) |
Add a set() method to HeapValue as well
And use it instead of simply assigning to it, so we can add a write
barrier later on.
Change-Id: I31c0d0b20ed5d37fee046aa02af17875679b22bf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4regexpobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4regexpobject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp index 3ec24edb5d..7b15494ea9 100644 --- a/src/qml/jsruntime/qv4regexpobject.cpp +++ b/src/qml/jsruntime/qv4regexpobject.cpp @@ -220,7 +220,7 @@ void Heap::RegExpCtor::init(QV4::ExecutionContext *scope) void Heap::RegExpCtor::clearLastMatch() { - lastMatch = Primitive::nullValue(); + lastMatch.set(internalClass->engine, Primitive::nullValue()); lastInput.set(internalClass->engine, internalClass->engine->id_empty()->d()); lastMatchStart = 0; lastMatchEnd = 0; @@ -377,7 +377,7 @@ void RegExpPrototype::method_exec(const BuiltinFunction *, Scope &scope, CallDat *array->propertyData(Index_ArrayInput) = str; RegExpCtor::Data *dd = regExpCtor->d(); - dd->lastMatch = array; + dd->lastMatch.set(scope.engine, array); dd->lastInput.set(scope.engine, str->d()); dd->lastMatchStart = matchOffsets[0]; dd->lastMatchEnd = matchOffsets[1]; |