diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-05-12 15:01:07 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-05-19 06:23:19 +0000 |
commit | cdbc4b83d59e08189d6ece9ccd88a646be155c08 (patch) | |
tree | ffd52e753313d8c3528fdab5a37bc089545b48aa /src/qml/jsruntime/qv4object.cpp | |
parent | 70a49fe042dd244926cc4a9cb6affb8b4f3d9b7f (diff) | |
download | qtdeclarative-cdbc4b83d59e08189d6ece9ccd88a646be155c08.tar.gz |
Properly encapsulate all accesses to the vtable
Change-Id: I3f6ae59d01c7b6c898e98d3b6f65b84a19b8851a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4object.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4object.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp index 3d8e8f3ddf..f5dafa7914 100644 --- a/src/qml/jsruntime/qv4object.cpp +++ b/src/qml/jsruntime/qv4object.cpp @@ -266,7 +266,7 @@ void Object::markObjects(Heap::Base *that, ExecutionEngine *e) if (o->prototype) o->prototype->mark(e); uint nInline = o->vtable()->nInlineProperties; - Value *v = reinterpret_cast<Value *>(o) + o->vt->inlinePropertyOffset; + Value *v = reinterpret_cast<Value *>(o) + o->vtable()->inlinePropertyOffset; const Value *end = v + nInline; while (v < end) { v->mark(e); @@ -507,7 +507,7 @@ ReturnedValue Object::getLookup(const Managed *m, Lookup *l) if (v != Primitive::emptyValue().asReturnedValue()) { if (attrs.isData()) { if (l->level == 0) { - uint nInline = o->d()->vt->nInlineProperties; + uint nInline = o->d()->vtable()->nInlineProperties; if (l->index < nInline) l->getter = Lookup::getter0Inline; else { @@ -549,7 +549,7 @@ void Object::setLookup(Managed *m, Lookup *l, const Value &value) if (idx != UINT_MAX && o->internalClass()->propertyData[idx].isData() && o->internalClass()->propertyData[idx].isWritable()) { l->classList[0] = o->internalClass(); l->index = idx; - l->setter = idx < o->d()->vt->nInlineProperties ? Lookup::setter0Inline : Lookup::setter0; + l->setter = idx < o->d()->vtable()->nInlineProperties ? Lookup::setter0Inline : Lookup::setter0; *o->propertyData(idx) = value; return; } |