aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/common/qv4compileddata.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-12-22 14:06:34 +0100
committerUlf Hermann <ulf.hermann@qt.io>2024-01-10 11:22:43 +0100
commit47ddbb72e052989622f5fa23e032c787bed5f2e5 (patch)
tree6c18a31045527b7b43be331651607ac34908639a /src/qml/common/qv4compileddata.cpp
parentbe6d1499af75228341227d15441284e07cfe1e41 (diff)
QtQml: Get rid of the module mutex
It only exists so that the type loader can query pre-compiled and native modules from the loader thread. However, the type loader already has a mutex of its own. We can use that to inject a "native" blob into its script cache for the same effect. We need to get rid of the mutex so that we can use the module map for other compilation units, too. Change-Id: I5a9c266ea36b50f5ea69214110def644f7501674 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/common/qv4compileddata.cpp')
-rw-r--r--src/qml/common/qv4compileddata.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/qml/common/qv4compileddata.cpp b/src/qml/common/qv4compileddata.cpp
index 4ed53e6907..14315084bd 100644
--- a/src/qml/common/qv4compileddata.cpp
+++ b/src/qml/common/qv4compileddata.cpp
@@ -108,6 +108,15 @@ bool CompilationUnit::saveToDisk(const QUrl &unitUrl, QString *errorString)
});
}
+QStringList CompilationUnit::moduleRequests() const
+{
+ QStringList requests;
+ requests.reserve(data->moduleRequestTableSize);
+ for (uint i = 0; i < data->moduleRequestTableSize; ++i)
+ requests << stringAt(data->moduleRequestTable()[i]);
+ return requests;
+}
+
} // namespace CompiledData
} // namespace QV4