diff options
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index 8582f44668..b5c497be49 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -1807,6 +1807,21 @@ void Runtime::ThrowOnNullOrUndefined::call(ExecutionEngine *engine, const Value engine->throwTypeError(); } +void Runtime::MarkCustom::call(const Value &toBeMarked) +{ + auto *h = toBeMarked.heapObject(); + if (!h) + return; + Q_ASSERT(h->internalClass); + auto engine = h->internalClass->engine; + Q_ASSERT(engine); + // runtime function is only meant to be called while gc is ongoing + Q_ASSERT(engine->isGCOngoing); + QV4::WriteBarrier::markCustom(engine, [&](QV4::MarkStack *ms) { + h->mark(ms); + }); +} + ReturnedValue Runtime::ConvertThisToObject::call(ExecutionEngine *engine, const Value &t) { if (!t.isObject()) { @@ -2493,6 +2508,8 @@ QHash<const void *, const char *> Runtime::symbolTable() {symbol<Closure>(), "Closure" }, + {symbol<MarkCustom>(), "MarkCustom"}, + {symbol<ConvertThisToObject>(), "ConvertThisToObject" }, {symbol<DeclareVar>(), "DeclareVar" }, {symbol<CreateMappedArgumentsObject>(), "CreateMappedArgumentsObject" }, |
