aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4errorobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-08-28 10:57:37 +0200
committerLars Knoll <lars.knoll@theqtcompany.com>2015-09-22 08:20:07 +0000
commitb3cdc489142e673c8cb6ac81df7d01191a30c1aa (patch)
tree359e26c9dbd3145638f99a69847930ae1b7f8cdf /src/qml/jsruntime/qv4errorobject.cpp
parent6190b10d1cb8b450c7429d35dc8efbe7c7f630b2 (diff)
Simplify new construction scheme
Declare the default prototype and internal class in the class itself. Change-Id: I08c2b42aa61a886580061336ae60cef8dedc0f03 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4errorobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4errorobject.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4errorobject.cpp b/src/qml/jsruntime/qv4errorobject.cpp
index eb45ca6513..219f4845c4 100644
--- a/src/qml/jsruntime/qv4errorobject.cpp
+++ b/src/qml/jsruntime/qv4errorobject.cpp
@@ -274,7 +274,7 @@ ReturnedValue EvalErrorCtor::construct(const Managed *m, CallData *callData)
{
Scope scope(static_cast<const EvalErrorCtor *>(m)->engine());
ScopedValue v(scope, callData->argument(0));
- return (scope.engine->memoryManager->allocObject<EvalErrorObject>(scope.engine->errorClass, scope.engine->evalErrorPrototype(), v))->asReturnedValue();
+ return (scope.engine->memoryManager->allocObject<EvalErrorObject>(v))->asReturnedValue();
}
Heap::RangeErrorCtor::RangeErrorCtor(QV4::ExecutionContext *scope)
@@ -286,7 +286,7 @@ ReturnedValue RangeErrorCtor::construct(const Managed *m, CallData *callData)
{
Scope scope(static_cast<const RangeErrorCtor *>(m)->engine());
ScopedValue v(scope, callData->argument(0));
- return (scope.engine->memoryManager->allocObject<RangeErrorObject>(scope.engine->errorClass, scope.engine->evalErrorPrototype(), v))->asReturnedValue();
+ return (scope.engine->memoryManager->allocObject<RangeErrorObject>(v))->asReturnedValue();
}
Heap::ReferenceErrorCtor::ReferenceErrorCtor(QV4::ExecutionContext *scope)
@@ -298,7 +298,7 @@ ReturnedValue ReferenceErrorCtor::construct(const Managed *m, CallData *callData
{
Scope scope(static_cast<const ReferenceErrorCtor *>(m)->engine());
ScopedValue v(scope, callData->argument(0));
- return (scope.engine->memoryManager->allocObject<ReferenceErrorObject>(scope.engine->errorClass, scope.engine->referenceErrorPrototype(), v))->asReturnedValue();
+ return (scope.engine->memoryManager->allocObject<ReferenceErrorObject>(v))->asReturnedValue();
}
Heap::SyntaxErrorCtor::SyntaxErrorCtor(QV4::ExecutionContext *scope)
@@ -310,7 +310,7 @@ ReturnedValue SyntaxErrorCtor::construct(const Managed *m, CallData *callData)
{
Scope scope(static_cast<const SyntaxErrorCtor *>(m)->engine());
ScopedValue v(scope, callData->argument(0));
- return (scope.engine->memoryManager->allocObject<SyntaxErrorObject>(scope.engine->errorClass, scope.engine->syntaxErrorPrototype(), v))->asReturnedValue();
+ return (scope.engine->memoryManager->allocObject<SyntaxErrorObject>(v))->asReturnedValue();
}
Heap::TypeErrorCtor::TypeErrorCtor(QV4::ExecutionContext *scope)
@@ -322,7 +322,7 @@ ReturnedValue TypeErrorCtor::construct(const Managed *m, CallData *callData)
{
Scope scope(static_cast<const TypeErrorCtor *>(m)->engine());
ScopedValue v(scope, callData->argument(0));
- return (scope.engine->memoryManager->allocObject<TypeErrorObject>(scope.engine->errorClass, scope.engine->typeErrorPrototype(), v))->asReturnedValue();
+ return (scope.engine->memoryManager->allocObject<TypeErrorObject>(v))->asReturnedValue();
}
Heap::URIErrorCtor::URIErrorCtor(QV4::ExecutionContext *scope)
@@ -334,7 +334,7 @@ ReturnedValue URIErrorCtor::construct(const Managed *m, CallData *callData)
{
Scope scope(static_cast<const URIErrorCtor *>(m)->engine());
ScopedValue v(scope, callData->argument(0));
- return (scope.engine->memoryManager->allocObject<URIErrorObject>(scope.engine->errorClass, scope.engine->uRIErrorPrototype(), v))->asReturnedValue();
+ return (scope.engine->memoryManager->allocObject<URIErrorObject>(v))->asReturnedValue();
}
void ErrorPrototype::init(ExecutionEngine *engine, Object *ctor, Object *obj)