diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-08-04 10:39:09 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-08-06 10:00:45 +0000 |
commit | d046de0ddb7a8d8762821915d3973a1bea9d499c (patch) | |
tree | 3e75616f9cb1e4bf9cbb5fdaa337223365e01dd5 /src/qml/jsruntime/qv4engine.cpp | |
parent | 15ef80f1d92eb3a88dc135b4e6347f57a5982f9c (diff) |
Setup the prototype correctly when subclassing error objects
Change-Id: I5e394ef8d4d6d87bedb26070d51660e3ebe3ab1b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 07340d502f..fcc2feced4 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -796,7 +796,7 @@ Heap::RegExpObject *ExecutionEngine::newRegExpObject(const QRegExp &re) Heap::Object *ExecutionEngine::newErrorObject(const Value &value) { - return ErrorObject::create<ErrorObject>(this, value); + return ErrorObject::create<ErrorObject>(this, value, errorCtor()); } Heap::Object *ExecutionEngine::newSyntaxErrorObject(const QString &message) @@ -833,7 +833,7 @@ Heap::Object *ExecutionEngine::newRangeErrorObject(const QString &message) Heap::Object *ExecutionEngine::newURIErrorObject(const Value &message) { - return ErrorObject::create<URIErrorObject>(this, message); + return ErrorObject::create<URIErrorObject>(this, message, uRIErrorCtor()); } Heap::Object *ExecutionEngine::newVariantObject(const QVariant &v) |