diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-01-20 13:51:00 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-21 20:46:50 +0100 |
commit | 7d4fc70e70ca566900c01aa7c5e3ec4770d15933 (patch) | |
tree | 8b223bae1ab0604788abae489e87ec2fbd5298e8 /src/qml/jsruntime/qv4object.cpp | |
parent | 3efae4fc7fff96f147f79013ef9fff9c31557229 (diff) |
Split ManagedVTable into two classes
Keep the basic methods in ManagedVTable, but have
the Object related stuff in an ObjectVTable class.
Change-Id: I9b068acf3caef813686227b8d935e7df1a7d1a6e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4object.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4object.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp index 43e0808a24..f45c40e469 100644 --- a/src/qml/jsruntime/qv4object.cpp +++ b/src/qml/jsruntime/qv4object.cpp @@ -67,7 +67,7 @@ using namespace QV4; -DEFINE_MANAGED_VTABLE(Object); +DEFINE_OBJECT_VTABLE(Object); Object::Object(ExecutionEngine *engine) : Managed(engine->objectClass) @@ -408,6 +408,16 @@ bool Object::hasOwnProperty(uint index) const return false; } +ReturnedValue Object::construct(Managed *m, CallData *) +{ + return m->engine()->currentContext()->throwTypeError(); +} + +ReturnedValue Object::call(Managed *m, CallData *) +{ + return m->engine()->currentContext()->throwTypeError(); +} + ReturnedValue Object::get(Managed *m, const StringRef name, bool *hasProperty) { return static_cast<Object *>(m)->internalGet(name, hasProperty); @@ -1122,7 +1132,7 @@ void Object::copyArrayData(Object *other) uint Object::getLength(const Managed *m) { Scope scope(m->engine()); - ScopedValue v(scope, const_cast<Managed *>(m)->get(scope.engine->id_length)); + ScopedValue v(scope, static_cast<Object *>(const_cast<Managed *>(m))->get(scope.engine->id_length)); return v->toUInt32(); } @@ -1196,7 +1206,7 @@ void Object::initSparseArray() } -DEFINE_MANAGED_VTABLE(ArrayObject); +DEFINE_OBJECT_VTABLE(ArrayObject); ArrayObject::ArrayObject(ExecutionEngine *engine, const QStringList &list) : Object(engine->arrayClass) |