diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-01-11 16:10:47 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-01-12 10:09:42 +0100 |
commit | 8dbe5b2be4e65e96013651f1ffee1cc26dd1ead1 (patch) | |
tree | 64a2f54910f99aedb0aac93d042e9a21056cabc0 /src/qml/qml/qqmlscriptdata.cpp | |
parent | 24372250debc0a067470392776a178b155cedf3e (diff) |
Remove QQmlCleanup from QQmlScriptData
It prevents the compilation unit held by QQmlScriptData from being
released on clearComponentCache(). The comment justifying the
QQmlCleanup has been wrong since we moved away from V8.
Task-number: QTBUG-89659
Pick-to: 5.15
Change-Id: I220561d90f707540e47c76d60a51468ee231ce9a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlscriptdata.cpp')
-rw-r--r-- | src/qml/qml/qqmlscriptdata.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/qml/qml/qqmlscriptdata.cpp b/src/qml/qml/qqmlscriptdata.cpp index 50ec0e20cd..684564fcfb 100644 --- a/src/qml/qml/qqmlscriptdata.cpp +++ b/src/qml/qml/qqmlscriptdata.cpp @@ -117,11 +117,6 @@ QV4::ReturnedValue QQmlScriptData::scriptValueForContext( QV4::ExecutionEngine *v4 = parentQmlContextData->engine()->handle(); QV4::Scope scope(v4); - if (!hasEngine()) { - addToEngine(parentQmlContextData->engine()); - addref(); - } - QV4::Scoped<QV4::QmlContext> qmlExecutionContext(scope); if (auto qmlContextData = qmlContextDataForContext(parentQmlContextData)) { qmlExecutionContext = QV4::QmlContext::create(v4->rootContext(), std::move(qmlContextData), @@ -158,13 +153,4 @@ QV4::ReturnedValue QQmlScriptData::scriptValueForContext( return value->asReturnedValue(); } -void QQmlScriptData::clear() -{ - typeNameCache = nullptr; - scripts.clear(); - - // An addref() was made when the QQmlCleanup was added to the engine. - release(); -} - QT_END_NAMESPACE |