diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-05-15 09:56:05 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-05-19 06:23:29 +0000 |
commit | afbb57ae84ecbee5fab9eb6e58356b19d7995ea5 (patch) | |
tree | 33418ab6f9507c238998c61fdd818cb8823db71a /src/qml/jsruntime/qv4errorobject.cpp | |
parent | cae7975a036352ca4bbcf1381a445362f8e01367 (diff) |
Move the prototype into the internal class
This saves another pointer on all Objects.
Currently introduces a slight performance regression
on some of the v8 benchmarks, that needs addressing.
Change-Id: I87de8e1d198d2683f4e903c467ce2a60ba542243
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4errorobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4errorobject.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4errorobject.cpp b/src/qml/jsruntime/qv4errorobject.cpp index 65507e2251..6811438915 100644 --- a/src/qml/jsruntime/qv4errorobject.cpp +++ b/src/qml/jsruntime/qv4errorobject.cpp @@ -328,8 +328,7 @@ void ErrorPrototype::init(ExecutionEngine *engine, Object *ctor, Object *obj, He *obj->propertyData(Index_Constructor) = ctor; *obj->propertyData(Index_Message) = engine->id_empty(); *obj->propertyData(Index_Name) = engine->newString(QString::fromLatin1(ErrorObject::className(t))); - if (t == Heap::ErrorObject::Error) - obj->defineDefaultProperty(engine->id_toString(), method_toString, 0); + obj->defineDefaultProperty(engine->id_toString(), method_toString, 0); } void ErrorPrototype::method_toString(const BuiltinFunction *, Scope &scope, CallData *callData) |