aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4errorobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-08-01 21:39:35 +0200
committerLars Knoll <lars.knoll@qt.io>2018-08-02 20:25:18 +0000
commit245cb6b6a3e5a04dc43a3c4ce15831f68309e97f (patch)
treeda8e49f1110967f28a8f37dcd3e5a373297b0297 /src/qml/jsruntime/qv4errorobject.cpp
parentf289141524d9331bdafd9f88d95e0fa9b29ccdee (diff)
Fix a couple of test failures related to error objects
Set up the prototype chain for error objects correctly, and make them inherit from the right classes. Change-Id: I7bb12b3bb285950a1bff25e5c62954287a95970a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
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 e8b4e04e83..53c070898f 100644
--- a/src/qml/jsruntime/qv4errorobject.cpp
+++ b/src/qml/jsruntime/qv4errorobject.cpp
@@ -242,7 +242,7 @@ ReturnedValue ErrorCtor::virtualCall(const FunctionObject *f, const Value *, con
void Heap::EvalErrorCtor::init(QV4::ExecutionContext *scope)
{
- Heap::ErrorCtor::init(scope, QStringLiteral("EvalError"));
+ Heap::FunctionObject::init(scope, QStringLiteral("EvalError"));
}
ReturnedValue EvalErrorCtor::virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *)
@@ -253,7 +253,7 @@ ReturnedValue EvalErrorCtor::virtualCallAsConstructor(const FunctionObject *f, c
void Heap::RangeErrorCtor::init(QV4::ExecutionContext *scope)
{
- Heap::ErrorCtor::init(scope, QStringLiteral("RangeError"));
+ Heap::FunctionObject::init(scope, QStringLiteral("RangeError"));
}
ReturnedValue RangeErrorCtor::virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *)
@@ -264,7 +264,7 @@ ReturnedValue RangeErrorCtor::virtualCallAsConstructor(const FunctionObject *f,
void Heap::ReferenceErrorCtor::init(QV4::ExecutionContext *scope)
{
- Heap::ErrorCtor::init(scope, QStringLiteral("ReferenceError"));
+ Heap::FunctionObject::init(scope, QStringLiteral("ReferenceError"));
}
ReturnedValue ReferenceErrorCtor::virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *)
@@ -275,7 +275,7 @@ ReturnedValue ReferenceErrorCtor::virtualCallAsConstructor(const FunctionObject
void Heap::SyntaxErrorCtor::init(QV4::ExecutionContext *scope)
{
- Heap::ErrorCtor::init(scope, QStringLiteral("SyntaxError"));
+ Heap::FunctionObject::init(scope, QStringLiteral("SyntaxError"));
}
ReturnedValue SyntaxErrorCtor::virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *)
@@ -286,7 +286,7 @@ ReturnedValue SyntaxErrorCtor::virtualCallAsConstructor(const FunctionObject *f,
void Heap::TypeErrorCtor::init(QV4::ExecutionContext *scope)
{
- Heap::ErrorCtor::init(scope, QStringLiteral("TypeError"));
+ Heap::FunctionObject::init(scope, QStringLiteral("TypeError"));
}
ReturnedValue TypeErrorCtor::virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *)
@@ -297,7 +297,7 @@ ReturnedValue TypeErrorCtor::virtualCallAsConstructor(const FunctionObject *f, c
void Heap::URIErrorCtor::init(QV4::ExecutionContext *scope)
{
- Heap::ErrorCtor::init(scope, QStringLiteral("URIError"));
+ Heap::FunctionObject::init(scope, QStringLiteral("URIError"));
}
ReturnedValue URIErrorCtor::virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *)