qtdeclarative/tools/qmljs
Ulf Hermann dc60c305a2 QtQml: Model native modules as compilation units
QQmlTypeLoader::injectedScript() was unsafe and impossible to fix
because it had to query the engine from the type loader thread in order
to find out whether to load a script from an actual file.

By removing the whole special-casing of native modules, we can make the
script loading thread safe. A native module is now also a compilation
unit, with a regular QV4::Module as value. This means we can remove a
lot of code that deals with the native modules in the engine.

The downside is that native modules are now a lot larger than before.
However, given that they don't appear in any examples and hardly any
bugs have been filed about native modules since their introduction, we
can assume that they are not a very popular feature. The reduction in
complexity and the removal of the native modules map in the engine is
expected to outweigh the extra memory overhead for native modules.

Task-number: QTBUG-131721
Pick-to: 6.8
Change-Id: Ia7388d7ba8d71637559a791d874257fba4646330
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-12-06 17:39:19 +01:00
..
CMakeLists.txt Remove the manual undef of the min/max macros, or def NOMINMAX 2023-06-06 07:24:51 +00:00
qmljs.cpp QtQml: Model native modules as compilation units 2024-12-06 17:39:19 +01:00