diff options
author | Simon Hausmann <[email protected]> | 2016-05-02 16:55:36 +0200 |
---|---|---|
committer | Simon Hausmann <[email protected]> | 2016-09-30 08:17:39 +0000 |
commit | c9ffed92a0dee0ae00a9632177ea42f85ea8a48c (patch) | |
tree | cf56b80e4d9771193ca179f58108ecb2a94671fb /src/qml/jsruntime/qv4jsonobject.cpp | |
parent | 79cfc8788d6267eeb263983466ba21758f618dcd (diff) |
Fix crash with window-less QQuickItems
Mark QQuickItem visual children directly in QQuickItem instead of
relying on the item being a (grand) child of a window.
[ChangeLog][QtQuick] Fix crash with QQuickItems created via JavaScript being
garbage collected sometimes when they're not assigned to a window.
This may happen even in qmlscene when between the creation of the root item and
the assignment to the QQuickWindow the garbage collector runs.
The previous approach of a persistent in QQuickView marking the visual item
hierarchy relies on the existence of a view. The only thing left to do in the
view and qml window implementation is enforcing the CppOwnership policy set on
the content item in QQuickWindow by ensuring the presence of the JS wrapper,
replacing the persistent with a weak value.
This also introduces a new internal mechanism for QObject sub-classes to
provide their own V4 JS wrapper types.
Task-number: QTBUG-39888
Change-Id: Icd45a636a6d4e4528fc19165b13f4e1ca7967087
Reviewed-by: Erik Verbruggen <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4jsonobject.cpp')
0 files changed, 0 insertions, 0 deletions