aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsapi
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-12-21 16:53:36 +0100
committerUlf Hermann <ulf.hermann@qt.io>2024-01-10 11:22:37 +0100
commitbe6d1499af75228341227d15441284e07cfe1e41 (patch)
tree99c5b1e3dc7f1b99d8c141f1b8138feacd29e020 /src/qml/jsapi
parentcfdc612c3022b3f35545fd5e4e0bcd2661f657f1 (diff)
QtQml: Always link executable CU on creation
We don't want floating unlinked executable CUs. They should always be tied to an engine, and the engine should not change. This gives us one definite point where to register them with the engine (to be done in subsequent change). Unfortunately, due to the refcounting, we need to remove the engine from any still-referenced CUs when the engine itself is destructed. We will be able to drop the refcounting and make the engine fully own its executable CUs once we can hold base CUs in most places. Change-Id: I9a53e83d5c4746c2b2bca896b51baa4fe7fee757 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsapi')
-rw-r--r--src/qml/jsapi/qjsengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp
index 8f1496a8d4..8c40d95961 100644
--- a/src/qml/jsapi/qjsengine.cpp
+++ b/src/qml/jsapi/qjsengine.cpp
@@ -576,7 +576,7 @@ QJSValue QJSEngine::importModule(const QString &fileName)
QV4::Scope scope(m_v4Engine);
if (const auto compiled = module.compiled) {
- QV4::Scoped<QV4::Module> moduleNamespace(scope, compiled->instantiate(m_v4Engine));
+ QV4::Scoped<QV4::Module> moduleNamespace(scope, compiled->instantiate());
if (m_v4Engine->hasException)
return QJSValuePrivate::fromReturnedValue(m_v4Engine->catchException());
compiled->evaluate();