aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcompiler_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2016-06-01 10:55:45 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2016-06-01 10:35:21 +0000
commit3b14f29b8e5b889c7682eaca3e750493a05bcdb8 (patch)
tree85af2a2714412cf3db4c8b6e65ccce9ad1300d2f /src/qml/qml/qqmlcompiler_p.h
parent1823c1c6d75261cf0b3f247e07ac3d0c7b31f1c0 (diff)
Ensure that CompilationUnit instances are deleted in the engine thread
When using CompilationUnit with a QML engine, ensure that they are deleted in the same thread as the QML engine. Only the QML engine has a secondary thread (not a plain QJSEngine) and there it may happen that the last refcount drops within the loader thread. For example when the trimCache() is called within the loader. The destruction of the CompilationUnit however is not safe to perform in a secondary thread. Change-Id: Ia0105a8885ec97b0b2159e32e637adbd4e99f016 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlcompiler_p.h')
-rw-r--r--src/qml/qml/qqmlcompiler_p.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlcompiler_p.h b/src/qml/qml/qqmlcompiler_p.h
index 35beba1562..2846ae4084 100644
--- a/src/qml/qml/qqmlcompiler_p.h
+++ b/src/qml/qml/qqmlcompiler_p.h
@@ -91,9 +91,6 @@ public:
QQmlRefPointer<QV4::CompiledData::CompilationUnit> compilationUnit;
-protected:
- virtual void destroy(); // From QQmlRefCount
-
private:
QQmlCompiledData(const QQmlCompiledData &other);
QQmlCompiledData &operator=(const QQmlCompiledData &other);