Merge lp:~timo-jyrinki/kubuntu-packaging/qtdeclarative-opensource-src_530ubuntu10 into lp:~kubuntu-packagers/kubuntu-packaging/qtdeclarative-opensource-src

Proposed by Timo Jyrinki
Status: Merged
Approved by: Timo Jyrinki
Approved revision: 164
Merged at revision: 164
Proposed branch: lp:~timo-jyrinki/kubuntu-packaging/qtdeclarative-opensource-src_530ubuntu10
Merge into: lp:~kubuntu-packagers/kubuntu-packaging/qtdeclarative-opensource-src
Diff against target: 93 lines (+73/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/Avoid-double-deletion-when-deleting-an-incubating-co.patch (+65/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~timo-jyrinki/kubuntu-packaging/qtdeclarative-opensource-src_530ubuntu10
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Kubuntu Packagers Pending
Review via email: mp+231375@code.launchpad.net

Commit message

* debian/patches/Avoid-double-deletion-when-deleting-an-incubating-co.patch:
  - Cherry-pick a fix to double deletion (LP: #1358169)

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2014-08-13 12:18:53 +0000
3+++ debian/changelog 2014-08-19 14:35:36 +0000
4@@ -1,3 +1,10 @@
5+qtdeclarative-opensource-src (5.3.0-3ubuntu10) utopic; urgency=medium
6+
7+ * debian/patches/Avoid-double-deletion-when-deleting-an-incubating-co.patch:
8+ - Cherry-pick a fix to double deletion (LP: #1358169)
9+
10+ -- Timo Jyrinki <timo-jyrinki@ubuntu.com> Mon, 18 Aug 2014 11:13:41 +0000
11+
12 qtdeclarative-opensource-src (5.3.0-3ubuntu9) utopic; urgency=medium
13
14 * debian/patches/Fix-crash-with-running-animators-on-re-shown-windows.patch:
15
16=== added file 'debian/patches/Avoid-double-deletion-when-deleting-an-incubating-co.patch'
17--- debian/patches/Avoid-double-deletion-when-deleting-an-incubating-co.patch 1970-01-01 00:00:00 +0000
18+++ debian/patches/Avoid-double-deletion-when-deleting-an-incubating-co.patch 2014-08-19 14:35:36 +0000
19@@ -0,0 +1,65 @@
20+From 01c6af3fc940378e8eee41a9fb8273420ef5a7e1 Mon Sep 17 00:00:00 2001
21+From: Martin Jones <martin.jones@jollamobile.com>
22+Date: Sat, 9 Aug 2014 22:01:08 +1000
23+Subject: [PATCH] Avoid double deletion when deleting an incubating component.
24+
25+The guard in QQmlIncubatorPrivate::clear() was invalidated by clearing
26+the guards in QQmlIncubatorPrivate::incubate() when a deletion was
27+detected.
28+
29+If we detect a deletion, leave the guards in place, to be handled in
30+QQmlIncubatorPrivate::clear().
31+
32+Task-number: QTBUG-40685
33+Change-Id: I1bf7422fda97745f1f7a3b42285a399244c09a1f
34+Reviewed-by: Alan Alpert <aalpert@blackberry.com>
35+Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
36+Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
37+---
38+ src/qml/qml/qqmlincubator.cpp | 7 +++----
39+ tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp | 4 ----
40+ 2 files changed, 3 insertions(+), 8 deletions(-)
41+
42+diff --git a/src/qml/qml/qqmlincubator.cpp b/src/qml/qml/qqmlincubator.cpp
43+index 4cdeb19..098a664 100644
44+--- a/src/qml/qml/qqmlincubator.cpp
45++++ b/src/qml/qml/qqmlincubator.cpp
46+@@ -292,10 +292,7 @@ void QQmlIncubatorPrivate::incubate(QQmlInstantiationInterrupt &i)
47+ QQmlEngine *engine = compiledData->engine;
48+ QQmlEnginePrivate *enginePriv = QQmlEnginePrivate::get(engine);
49+
50+- bool guardOk = vmeGuard.isOK();
51+- vmeGuard.clear();
52+-
53+- if (!guardOk) {
54++ if (!vmeGuard.isOK()) {
55+ QQmlError error;
56+ error.setUrl(compiledData->url);
57+ error.setDescription(QQmlComponent::tr("Object destroyed during incubation"));
58+@@ -305,6 +302,8 @@ void QQmlIncubatorPrivate::incubate(QQmlInstantiationInterrupt &i)
59+ goto finishIncubate;
60+ }
61+
62++ vmeGuard.clear();
63++
64+ if (progress == QQmlIncubatorPrivate::Execute) {
65+ enginePriv->referenceScarceResources();
66+ QObject *tresult = 0;
67+diff --git a/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp b/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp
68+index 0b9872f..75b10ed 100644
69+--- a/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp
70++++ b/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp
71+@@ -171,10 +171,6 @@ void tst_qqmlincubator::objectDeleted()
72+ controller.incubateWhile(&b);
73+ }
74+
75+- // We have to cheat and manually remove it from the creator->allCreatedObjects
76+- // otherwise we will do a double delete
77+- QQmlIncubatorPrivate *incubatorPriv = QQmlIncubatorPrivate::get(&incubator);
78+- incubatorPriv->creator->allCreatedObjects().pop();
79+ delete SelfRegisteringType::me();
80+
81+ {
82+--
83+2.1.0.rc1
84+
85
86=== modified file 'debian/patches/series'
87--- debian/patches/series 2014-08-13 12:18:53 +0000
88+++ debian/patches/series 2014-08-19 14:35:36 +0000
89@@ -11,3 +11,4 @@
90 Support-RFC2822Date-date-format-similar-to-V8.patch
91 8454a21b-Flickable-Cancel-interaction-on-interactive-changes.patch
92 Fix-crash-with-running-animators-on-re-shown-windows.patch
93+Avoid-double-deletion-when-deleting-an-incubating-co.patch

Subscribers

People subscribed via source and target branches