From 9242e5a685695356b2c9101a5e1642a726a6fede Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 31 Jan 2017 15:00:06 +0100 Subject: 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 --- src/qml/qml/qqmlcomponent.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/qml/qml/qqmlcomponent.cpp') diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index 993ad10639..75968ffc43 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -1376,7 +1376,7 @@ void QQmlComponent::incubateObject(QQmlV4Function *args) r->setPrototype(p); if (!valuemap->isUndefined()) - r->d()->valuemap = valuemap; + r->d()->valuemap.set(scope.engine, valuemap); r->d()->qmlContext.set(scope.engine, v4->qmlContext()); r->d()->parent = parent; @@ -1461,7 +1461,7 @@ void QV4::QmlIncubatorObject::method_set_statusChanged(const BuiltinFunction *, if (!o || callData->argc < 1) THROW_TYPE_ERROR(); - o->d()->statusChanged = callData->args[0]; + o->d()->statusChanged.set(scope.engine, callData->args[0]); RETURN_UNDEFINED(); } @@ -1473,8 +1473,8 @@ QQmlComponentExtension::~QQmlComponentExtension() void QV4::Heap::QmlIncubatorObject::init(QQmlIncubator::IncubationMode m) { Object::init(); - valuemap = QV4::Primitive::undefinedValue(); - statusChanged = QV4::Primitive::undefinedValue(); + valuemap.set(internalClass->engine, QV4::Primitive::undefinedValue()); + statusChanged.set(internalClass->engine, QV4::Primitive::undefinedValue()); parent.init(); qmlContext.set(internalClass->engine, nullptr); incubator = new QQmlComponentIncubator(this, m); -- cgit v1.2.3