From 415f55d1400f6abdd3a8e3edaf5ff208ecdad216 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 7 Aug 2015 13:56:31 +0200 Subject: 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 --- src/qml/jsruntime/qv4managed_p.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/qml/jsruntime/qv4managed_p.h') diff --git a/src/qml/jsruntime/qv4managed_p.h b/src/qml/jsruntime/qv4managed_p.h index e0ad0d89e3..9b7df9e68e 100644 --- a/src/qml/jsruntime/qv4managed_p.h +++ b/src/qml/jsruntime/qv4managed_p.h @@ -148,15 +148,15 @@ public: }; Q_MANAGED_TYPE(Invalid) - bool isListType() const { return d()->vtable->type == Type_QmlSequence; } + bool isListType() const { return d()->vtable()->type == Type_QmlSequence; } - bool isArrayObject() const { return d()->vtable->type == Type_ArrayObject; } - bool isStringObject() const { return d()->vtable->type == Type_StringObject; } + bool isArrayObject() const { return d()->vtable()->type == Type_ArrayObject; } + bool isStringObject() const { return d()->vtable()->type == Type_StringObject; } QString className() const; bool isEqualTo(const Managed *other) const - { return d()->vtable->isEqualTo(const_cast(this), const_cast(other)); } + { return d()->vtable()->isEqualTo(const_cast(this), const_cast(other)); } static bool isEqualTo(Managed *m, Managed *other); @@ -180,7 +180,7 @@ inline const Managed *Value::as() const { template<> inline const Object *Value::as() const { - return isManaged() && m() && m()->vtable->isObject ? objectValue() : 0; + return isManaged() && m() && m()->vtable()->isObject ? objectValue() : 0; } } -- cgit v1.2.3