aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4value_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-08-07 13:56:31 +0200
committerLars Knoll <lars.knoll@theqtcompany.com>2015-08-10 07:24:32 +0000
commit415f55d1400f6abdd3a8e3edaf5ff208ecdad216 (patch)
tree88e75e6c2b5d3b757ac59b644f71410158201354 /src/qml/jsruntime/qv4value_p.h
parentf21e8c641af6b2d10f0d7e7e0fc6a755dab3673c (diff)
Encapsulate and protect all accesses to the vtable of Heap objects
This is required, so we can safely access the vtable even while we're marking objects during GC. Change-Id: I34f56b61b4bca0d0742faf607eb5ab8b2c30685e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4value_p.h')
-rw-r--r--src/qml/jsruntime/qv4value_p.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h
index 718bdbb620..3aa1a6df39 100644
--- a/src/qml/jsruntime/qv4value_p.h
+++ b/src/qml/jsruntime/qv4value_p.h
@@ -329,11 +329,11 @@ struct Q_QML_PRIVATE_EXPORT Value
if (!m() || !isManaged())
return 0;
- Q_ASSERT(m()->vtable);
+ Q_ASSERT(m()->vtable());
#if !defined(QT_NO_QOBJECT_CHECK)
static_cast<const T *>(this)->qt_check_for_QMANAGED_macro(static_cast<const T *>(this));
#endif
- const VTable *vt = m()->vtable;
+ const VTable *vt = m()->vtable();
while (vt) {
if (vt == T::staticVTable())
return static_cast<const T *>(this);
@@ -396,13 +396,13 @@ inline bool Value::isString() const
{
if (!isManaged())
return false;
- return m() && m()->vtable->isString;
+ return m() && m()->vtable()->isString;
}
inline bool Value::isObject() const
{
if (!isManaged())
return false;
- return m() && m()->vtable->isObject;
+ return m() && m()->vtable()->isObject;
}
inline bool Value::isPrimitive() const