summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/qml/jsruntime/qv4context.cpp4
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4regexpobject.cpp4
-rw-r--r--src/qml/jsruntime/qv4value_p.h5
-rw-r--r--src/qml/qml/qqmlcomponent.cpp8
5 files changed, 13 insertions, 10 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp
index 3918d25326..667b8dbb24 100644
--- a/src/qml/jsruntime/qv4context.cpp
+++ b/src/qml/jsruntime/qv4context.cpp
@@ -168,7 +168,7 @@ void Heap::CatchContext::init(ExecutionContext *outerContext, String *exceptionV
compilationUnit = outer->compilationUnit;
this->exceptionVarName.set(engine, exceptionVarName);
- this->exceptionValue = exceptionValue;
+ this->exceptionValue.set(engine, exceptionValue);
}
@@ -302,7 +302,7 @@ void ExecutionContext::setProperty(String *name, const Value &value)
case Heap::ExecutionContext::Type_CatchContext: {
Heap::CatchContext *c = static_cast<Heap::CatchContext *>(ctx->d());
if (c->exceptionVarName->isEqualTo(name->d())) {
- c->exceptionValue = value;
+ c->exceptionValue.set(scope.engine, value);
return;
}
break;
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index a2433e7471..55b0175a47 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -540,7 +540,7 @@ void Heap::BoundFunction::init(QV4::ExecutionContext *scope, QV4::FunctionObject
Heap::FunctionObject::init(scope, QStringLiteral("__bound function__"));
this->target.set(s.engine, target->d());
this->boundArgs.set(s.engine, boundArgs ? boundArgs->d() : 0);
- this->boundThis = boundThis;
+ this->boundThis.set(scope->engine(), boundThis);
ScopedObject f(s, this);
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];
diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h
index 3d7776b736..ce7dd8fb0d 100644
--- a/src/qml/jsruntime/qv4value_p.h
+++ b/src/qml/jsruntime/qv4value_p.h
@@ -710,7 +710,10 @@ inline unsigned int Value::toUInt32() const
template <size_t offset>
struct HeapValue : Value {
- HeapValue &operator = (const Value &other) { setRawValue(other.rawValue()); return *this; }
+ void set(ExecutionEngine *e, const Value &newVal) {
+ Q_UNUSED(e);
+ setRawValue(newVal.rawValue());
+ }
};
template <size_t offset>
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);