dev-qt/qtdeclarative: backport fix for QTBUG-142514

Fix seems rather trivial so risking straight-to-stable to avoid
churn and deliver the crash fix to stable users earlier.

Note fix is not in the 6.10 branch yet wrt 6.10.9999 but the
backport should happen soon. Odds are that it will not be added
to the 6.10.2 branch so the patch will be needed until 6.10.3.

Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
Ionen Wolkens
2026-01-13 20:39:41 -05:00
parent c04ef0e6f5
commit 3934f6e650
2 changed files with 22 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
Recommended backport by upstream kde/plasma to fix plasmashell crashes.
https://bugs.kde.org/show_bug.cgi?id=513527
https://mail.kde.org/pipermail/distributions/2026-January/001667.html
https://qt-project.atlassian.net/browse/QTBUG-142514
https://codereview.qt-project.org/c/qt/qtdeclarative/+/704031
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -1580,8 +1580,7 @@
} else {
// If the object is C++-owned, we still have to release the weak reference we have
- // to it.
- ddata->jsWrapper.clear();
- if (lastCall && ddata->propertyCache)
- ddata->propertyCache.reset();
+ // to it. If the "main" wrapper is not ours, we should leave it alone, though.
+ if (ddata->jsWrapper.as<QObjectWrapper>() == this)
+ ddata->jsWrapper.clear();
}
}

View File

@@ -1,4 +1,4 @@
# Copyright 2021-2025 Gentoo Authors
# Copyright 2021-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -34,6 +34,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-6.10.1-QTBUG-142331.patch
"${FILESDIR}"/${PN}-6.10.1-QTBUG-142514.patch
)
src_configure() {