aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4errorobject_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-01-09 14:32:57 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2015-01-12 11:04:26 +0100
commita8e74cc2185e786ff0ae96135251354964417f95 (patch)
tree40056b951cf5fb3e900225fc448882a53a4e6b7f /src/qml/jsruntime/qv4errorobject_p.h
parentc10527b7c36a0c1ad49faaec5e4ea3dbb4f78b6c (diff)
Remove subtype usage in ErrorObject
Change-Id: I77e23516270a2330ec22215aef6782a38d7fca09 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4errorobject_p.h')
-rw-r--r--src/qml/jsruntime/qv4errorobject_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4errorobject_p.h b/src/qml/jsruntime/qv4errorobject_p.h
index 71a811c189..54762d8172 100644
--- a/src/qml/jsruntime/qv4errorobject_p.h
+++ b/src/qml/jsruntime/qv4errorobject_p.h
@@ -59,6 +59,8 @@ struct ErrorObject : Object {
ErrorObject(InternalClass *ic, QV4::Object *prototype, const ValueRef message, ErrorType t = Error);
ErrorObject(InternalClass *ic, QV4::Object *prototype, const QString &message, ErrorType t = Error);
ErrorObject(InternalClass *ic, QV4::Object *prototype, const QString &message, const QString &fileName, int line, int column, ErrorType t = Error);
+
+ ErrorType errorType;
StackTrace stackTrace;
String *stack;
};
@@ -269,7 +271,7 @@ struct URIErrorPrototype : ErrorObject
inline SyntaxErrorObject *ErrorObject::asSyntaxError()
{
- return subtype() == QV4::Heap::ErrorObject::SyntaxError ? static_cast<SyntaxErrorObject *>(this) : 0;
+ return d()->errorType == QV4::Heap::ErrorObject::SyntaxError ? static_cast<SyntaxErrorObject *>(this) : 0;
}
}