diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-08-01 21:39:35 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-08-02 20:25:18 +0000 |
commit | 245cb6b6a3e5a04dc43a3c4ce15831f68309e97f (patch) | |
tree | da8e49f1110967f28a8f37dcd3e5a373297b0297 /src/qml/jsruntime/qv4engine.cpp | |
parent | f289141524d9331bdafd9f88d95e0fa9b29ccdee (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/qv4engine.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index a776e7d14a..07340d502f 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -387,7 +387,7 @@ ExecutionEngine::ExecutionEngine(QJSEngine *jsEngine) Q_ASSERT(index == ErrorObject::Index_LineNumber); classes[Class_ErrorObjectWithMessage] = ic->addMember((str = newIdentifier(QStringLiteral("message")))->propertyKey(), Attr_Data|Attr_NotEnumerable, &index); Q_ASSERT(index == ErrorObject::Index_Message); - ic = newInternalClass(ErrorObject::staticVTable(), objectPrototype()); + ic = newInternalClass(Object::staticVTable(), objectPrototype()); ic = ic->addMember(id_constructor()->propertyKey(), Attr_Data|Attr_NotEnumerable, &index); Q_ASSERT(index == ErrorPrototype::Index_Constructor); ic = ic->addMember((str = newIdentifier(QStringLiteral("message")))->propertyKey(), Attr_Data|Attr_NotEnumerable, &index); |