diff options
| author | Fabian Kosmale <fabian.kosmale@qt.io> | 2025-06-04 16:10:27 +0200 |
|---|---|---|
| committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2025-06-15 18:53:51 +0000 |
| commit | 99f9b6f74c56d6d04540b465789e8a5df902a439 (patch) | |
| tree | d73d295dfa9de850b5a466c240afaf36a9a03d0d /src/qmlworkerscript/qquickworkerscript.cpp | |
| parent | 8b2e8b47552cb23a06c38088c83c2130bb60decc (diff) | |
gc: Assume less if hasConstWrapper is set
QQmlData is attached to a QObject, and consequently can't be used to
track engine local state. Whether a _given_ engine has a const wrapper
for a QObject is an example of such local state.
False assumptions based on hasConstWrapper in turn led to asserts when
using multiple engines.
Fix this by changing the meaning of hasConstWrapper: It now only
indicates that at some point, a given engine had created a const
wrapper. If that flag is not set, we know that we can skip lookups in
m_multiplyWrappedQObjects. If it is set, we can't assume anything, and
have to consult our engines m_multiplyWrappedQObjects to truly know
whether we have a const wrapper or not.
Pick-to: 6.8
Change-Id: Id26823bdc942b227c991571334f45f45b8b109c3
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit 5bec6a1d0c3d5f647a2a5c9375f2bf5e9647c24b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b5a6abf05bbfeddabf95cd4ee4f8bd5973b92b84)
Diffstat (limited to 'src/qmlworkerscript/qquickworkerscript.cpp')
0 files changed, 0 insertions, 0 deletions
