aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4functionobject_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-09-01 10:20:49 +0200
committerLars Knoll <lars.knoll@qt.io>2018-09-04 18:25:10 +0000
commit656db7a425fec6661ee3b42b89594a3e28637cdd (patch)
treeb3546bd33b128d2789b70b98e1122b903937bc33 /src/qml/jsruntime/qv4functionobject_p.h
parenta0a702cd9a315946a1b35dfe54d2dc965210ab6e (diff)
Don't define a prototype property for most functions
Only functions that are constructors should have a prototype property. Change-Id: Ifcf6f8b6c38de055d871d57ada38a23432974263 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject_p.h')
-rw-r--r--src/qml/jsruntime/qv4functionobject_p.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h
index 766960d2ac..5976fd8f78 100644
--- a/src/qml/jsruntime/qv4functionobject_p.h
+++ b/src/qml/jsruntime/qv4functionobject_p.h
@@ -76,7 +76,6 @@ namespace Heap {
DECLARE_HEAP_OBJECT(FunctionObject, Object) {
DECLARE_MARKOBJECTS(FunctionObject);
enum {
- Index_Prototype = 0,
Index_ProtoConstructor = 0
};
@@ -116,7 +115,7 @@ struct IndexedBuiltinFunction : FunctionObject {
DECLARE_HEAP_OBJECT(ScriptFunction, FunctionObject) {
DECLARE_MARKOBJECTS(ScriptFunction)
enum {
- Index_Name = FunctionObject::Index_Prototype + 1,
+ Index_Name,
Index_Length
};
void init(QV4::ExecutionContext *scope, Function *function, QV4::String *name = nullptr);
@@ -173,7 +172,7 @@ struct Q_QML_EXPORT FunctionObject: Object {
void setName(String *name) {
defineReadonlyConfigurableProperty(engine()->id_name(), *name);
}
- void createDefaultPrototypeProperty(uint protoSlot, uint protoConstructorSlot);
+ void createDefaultPrototypeProperty(uint protoConstructorSlot);
inline ReturnedValue callAsConstructor(const JSCallData &data) const;
ReturnedValue callAsConstructor(const Value *argv, int argc, const Value *newTarget = nullptr) const {