diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-04-16 09:36:38 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-28 12:49:53 +0200 |
commit | 52fcb218c379bb2008e24a2b5b00b613219ba7f6 (patch) | |
tree | ff19d8e3c509a96fc0ced9c60607c2430970a538 /src/qml/jsruntime/qv4internalclass_p.h | |
parent | 50d7c049e3310d4d9194c2efb5150e4e5a50e5ca (diff) |
Fix marking of prototype objects in internal class pool
As per reported bug, we have to protect ourselves against potential loops
and can mark the internal classes much simpler by just walking through
the memory pool they were allocated in.
Task-number: QTBUG-38299
Change-Id: I3ae96e8082e76d06f4321c5aa6d2e9645d2830a0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4internalclass_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4internalclass_p.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4internalclass_p.h b/src/qml/jsruntime/qv4internalclass_p.h index 91c6e264db..bd1828a146 100644 --- a/src/qml/jsruntime/qv4internalclass_p.h +++ b/src/qml/jsruntime/qv4internalclass_p.h @@ -44,6 +44,7 @@ #include <QHash> #include <QVector> #include "qv4global_p.h" +#include <private/qqmljsmemorypool_p.h> QT_BEGIN_NAMESPACE @@ -213,7 +214,7 @@ struct InternalClassTransition }; uint qHash(const QV4::InternalClassTransition &t, uint = 0); -struct InternalClass { +struct InternalClass : public QQmlJS::Managed { ExecutionEngine *engine; Object *prototype; const ManagedVTable *vtable; @@ -247,7 +248,6 @@ struct InternalClass { InternalClass *frozen(); void destroy(); - void markObjects(); private: InternalClass *addMemberImpl(String *string, PropertyAttributes data, uint *index); @@ -256,6 +256,11 @@ private: InternalClass(const InternalClass &other); }; +struct InternalClassPool : public QQmlJS::MemoryPool +{ + void markObjects(ExecutionEngine *engine); +}; + } QT_END_NAMESPACE |