diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-06-25 23:27:24 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-07-03 08:08:28 +0000 |
commit | 12d8b8c9e4ff05707df7bda479e69d997799c486 (patch) | |
tree | b1fbaeade75cdbcaf7f028e3c05f342422b3e544 /src/qml/jsruntime/qv4jscall_p.h | |
parent | 6f79b7519f10ba24485769cf9bf2922e002bd46a (diff) |
Move the Vtable for Managed objects into it's own file
Move both the code from qv4object and qv4managed into
a new qv4vtable_p.h file.
Change-Id: Ib1d58120b6c3b9b779b2692526c7e40a5265c4db
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4jscall_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4jscall_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4jscall_p.h b/src/qml/jsruntime/qv4jscall_p.h index e186285025..7feab36bec 100644 --- a/src/qml/jsruntime/qv4jscall_p.h +++ b/src/qml/jsruntime/qv4jscall_p.h @@ -101,6 +101,8 @@ struct JSCallData { inline ReturnedValue FunctionObject::callAsConstructor(const JSCallData &data) const { + if (!d()->jsConstruct) + return engine()->throwTypeError(QStringLiteral("Object is not a constructor.")); return d()->jsConstruct(this, data.args, data.argc); } |