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/qv4errorobject.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/qv4errorobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4errorobject.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/qml/jsruntime/qv4errorobject.cpp b/src/qml/jsruntime/qv4errorobject.cpp index f5d21b2f30..29615e8ec2 100644 --- a/src/qml/jsruntime/qv4errorobject.cpp +++ b/src/qml/jsruntime/qv4errorobject.cpp @@ -191,9 +191,9 @@ void ErrorObject::markObjects(Managed *that, ExecutionEngine *e) Object::markObjects(that, e); } -DEFINE_MANAGED_VTABLE(ErrorObject); +DEFINE_OBJECT_VTABLE(ErrorObject); -DEFINE_MANAGED_VTABLE(SyntaxErrorObject); +DEFINE_OBJECT_VTABLE(SyntaxErrorObject); SyntaxErrorObject::SyntaxErrorObject(ExecutionEngine *engine, const ValueRef msg) : ErrorObject(engine->syntaxErrorClass, msg, SyntaxError) @@ -250,24 +250,24 @@ URIErrorObject::URIErrorObject(ExecutionEngine *engine, const ValueRef message) { } -DEFINE_MANAGED_VTABLE(ErrorCtor); -DEFINE_MANAGED_VTABLE(EvalErrorCtor); -DEFINE_MANAGED_VTABLE(RangeErrorCtor); -DEFINE_MANAGED_VTABLE(ReferenceErrorCtor); -DEFINE_MANAGED_VTABLE(SyntaxErrorCtor); -DEFINE_MANAGED_VTABLE(TypeErrorCtor); -DEFINE_MANAGED_VTABLE(URIErrorCtor); +DEFINE_OBJECT_VTABLE(ErrorCtor); +DEFINE_OBJECT_VTABLE(EvalErrorCtor); +DEFINE_OBJECT_VTABLE(RangeErrorCtor); +DEFINE_OBJECT_VTABLE(ReferenceErrorCtor); +DEFINE_OBJECT_VTABLE(SyntaxErrorCtor); +DEFINE_OBJECT_VTABLE(TypeErrorCtor); +DEFINE_OBJECT_VTABLE(URIErrorCtor); ErrorCtor::ErrorCtor(ExecutionContext *scope) : FunctionObject(scope, QStringLiteral("Error")) { - setVTable(&static_vtbl); + setVTable(staticVTable()); } ErrorCtor::ErrorCtor(ExecutionContext *scope, const QString &name) : FunctionObject(scope, name) { - setVTable(&static_vtbl); + setVTable(staticVTable()); } ReturnedValue ErrorCtor::construct(Managed *m, CallData *callData) @@ -279,13 +279,13 @@ ReturnedValue ErrorCtor::construct(Managed *m, CallData *callData) ReturnedValue ErrorCtor::call(Managed *that, CallData *callData) { - return that->construct(callData); + return static_cast<Object *>(that)->construct(callData); } EvalErrorCtor::EvalErrorCtor(ExecutionContext *scope) : ErrorCtor(scope, QStringLiteral("EvalError")) { - setVTable(&static_vtbl); + setVTable(staticVTable()); } ReturnedValue EvalErrorCtor::construct(Managed *m, CallData *callData) @@ -298,7 +298,7 @@ ReturnedValue EvalErrorCtor::construct(Managed *m, CallData *callData) RangeErrorCtor::RangeErrorCtor(ExecutionContext *scope) : ErrorCtor(scope, QStringLiteral("RangeError")) { - setVTable(&static_vtbl); + setVTable(staticVTable()); } ReturnedValue RangeErrorCtor::construct(Managed *m, CallData *callData) @@ -311,7 +311,7 @@ ReturnedValue RangeErrorCtor::construct(Managed *m, CallData *callData) ReferenceErrorCtor::ReferenceErrorCtor(ExecutionContext *scope) : ErrorCtor(scope, QStringLiteral("ReferenceError")) { - setVTable(&static_vtbl); + setVTable(staticVTable()); } ReturnedValue ReferenceErrorCtor::construct(Managed *m, CallData *callData) @@ -324,7 +324,7 @@ ReturnedValue ReferenceErrorCtor::construct(Managed *m, CallData *callData) SyntaxErrorCtor::SyntaxErrorCtor(ExecutionContext *scope) : ErrorCtor(scope, QStringLiteral("SyntaxError")) { - setVTable(&static_vtbl); + setVTable(staticVTable()); } ReturnedValue SyntaxErrorCtor::construct(Managed *m, CallData *callData) @@ -337,7 +337,7 @@ ReturnedValue SyntaxErrorCtor::construct(Managed *m, CallData *callData) TypeErrorCtor::TypeErrorCtor(ExecutionContext *scope) : ErrorCtor(scope, QStringLiteral("TypeError")) { - setVTable(&static_vtbl); + setVTable(staticVTable()); } ReturnedValue TypeErrorCtor::construct(Managed *m, CallData *callData) @@ -350,7 +350,7 @@ ReturnedValue TypeErrorCtor::construct(Managed *m, CallData *callData) URIErrorCtor::URIErrorCtor(ExecutionContext *scope) : ErrorCtor(scope, QStringLiteral("URIError")) { - setVTable(&static_vtbl); + setVTable(staticVTable()); } ReturnedValue URIErrorCtor::construct(Managed *m, CallData *callData) |