diff options
Diffstat (limited to 'recipes-qt/qt5/qtdeclarative/0002-Fix-memory-leak-in-V4.patch')
-rw-r--r-- | recipes-qt/qt5/qtdeclarative/0002-Fix-memory-leak-in-V4.patch | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/recipes-qt/qt5/qtdeclarative/0002-Fix-memory-leak-in-V4.patch b/recipes-qt/qt5/qtdeclarative/0002-Fix-memory-leak-in-V4.patch deleted file mode 100644 index 423681ee..00000000 --- a/recipes-qt/qt5/qtdeclarative/0002-Fix-memory-leak-in-V4.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | From 80e63c5a2981473dd7ee3a4f382e54948bb99f75 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gunnar Sletta <gunnar@crimson.no> | ||
3 | Date: Thu, 19 Jan 2017 09:05:46 +0100 | ||
4 | Subject: [PATCH 2/3] Fix memory leak in V4 | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Transitions contain both an id and a set of flags, but the sorting | ||
10 | failed to take the flags into account in the operator<. As a result | ||
11 | we would some times end up with duplicate entries if the same id | ||
12 | was added multiple times with different flags. | ||
13 | |||
14 | If the same id was added again and again with varying flags, this | ||
15 | could lead to an ever expanding list filled with duplicate entries. | ||
16 | |||
17 | Fix this by also taking flags into account in operator< so that | ||
18 | operator< and operator== are symetric and the list gets correctly | ||
19 | sorted. | ||
20 | |||
21 | Change-Id: I762ec3f0c5b4ed9a1aecb9a883187a0445491591 | ||
22 | Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> | ||
23 | Reviewed-by: Robin Burchell <robin.burchell@crimson.no> | ||
24 | Signed-off-by: Gordan Markuš <gordan.markus@pelagicore.com> | ||
25 | --- | ||
26 | src/qml/jsruntime/qv4internalclass_p.h | 2 +- | ||
27 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
28 | |||
29 | diff --git a/src/qml/jsruntime/qv4internalclass_p.h b/src/qml/jsruntime/qv4internalclass_p.h | ||
30 | index dcda949..1d8ef4b 100644 | ||
31 | --- a/src/qml/jsruntime/qv4internalclass_p.h | ||
32 | +++ b/src/qml/jsruntime/qv4internalclass_p.h | ||
33 | @@ -234,7 +234,7 @@ struct InternalClassTransition | ||
34 | { return id == other.id && flags == other.flags; } | ||
35 | |||
36 | bool operator<(const InternalClassTransition &other) const | ||
37 | - { return id < other.id; } | ||
38 | + { return id < other.id || (id == other.id && flags < other.flags); } | ||
39 | }; | ||
40 | |||
41 | struct InternalClass : public QQmlJS::Managed { | ||
42 | -- | ||
43 | 2.9.3 | ||
44 | |||