diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-01-05 15:30:23 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-04-12 13:59:08 +0000 |
commit | 6002b48c3c5edc509c269c801fc8a088d5065ce8 (patch) | |
tree | a8fc764de87bfbd5f201930dcec1c7459502eb7e /src/qml/jsruntime/qv4managed.cpp | |
parent | 3932536b59df7b2fa010be6dd9f2501f6e306c8b (diff) |
garbage collect InternalClass
Internal classes are now allocated and collected through
the GC. As they are important to the deletion of other
objects (because of the vtable pointer living inside the
internal class), they need to get destroyed after regular
objects have been sweeped. Achieve this by using a separate
block allocator for internal class objects.
Our lookups do often contain pointers to internal classes,
so those need to be marked as well, so we don't accidentally
collect them.
Change-Id: I4762b054361c70c31f79f920f669ea0e8551601f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4managed.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4managed.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4managed.cpp b/src/qml/jsruntime/qv4managed.cpp index 082a3b42e4..c3def2f949 100644 --- a/src/qml/jsruntime/qv4managed.cpp +++ b/src/qml/jsruntime/qv4managed.cpp @@ -63,6 +63,8 @@ const VTable Managed::static_vtbl = isEqualTo }; +DEFINE_MANAGED_VTABLE(InternalClass); + QString Managed::className() const { @@ -114,6 +116,9 @@ QString Managed::className() const case Type_ForeachIteratorObject: s = "__ForeachIterator"; break; + case Type_InternalClass: + s = "__InternalClass"; + break; case Type_RegExp: s = "__RegExp"; break; |