diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-08-18 15:26:45 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-08-23 19:18:15 +0000 |
commit | f15cc9f1df8e17f049c111e3147d6c63c07eb756 (patch) | |
tree | ae4daaa5e1cde31c0e412b84e9521f3745911657 /src/qml/jsruntime/qv4generatorobject_p.h | |
parent | 6e2fc84646987135c96755fbe1c2af20fc722e3d (diff) |
Implement IsConstructor for Function objects
Use the jsConstruct member in the function object for this
and set it to a nullptr for methods that are not a constructor.
Change-Id: I63d2971b23b2596a8e3b6d2781f0d9ed3208693b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4generatorobject_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4generatorobject_p.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4generatorobject_p.h b/src/qml/jsruntime/qv4generatorobject_p.h index 017580e1a1..f00f730344 100644 --- a/src/qml/jsruntime/qv4generatorobject_p.h +++ b/src/qml/jsruntime/qv4generatorobject_p.h @@ -109,7 +109,7 @@ struct GeneratorFunction : ScriptFunction V4_INTERNALCLASS(GeneratorFunction) static Heap::FunctionObject *create(ExecutionContext *scope, Function *function); - static ReturnedValue virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *); + static constexpr VTable::CallAsConstructor virtualCallAsConstructor = nullptr; static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc); }; @@ -119,7 +119,6 @@ struct MemberGeneratorFunction : GeneratorFunction V4_INTERNALCLASS(MemberGeneratorFunction) static Heap::FunctionObject *create(ExecutionContext *scope, Function *function, String *name); - static ReturnedValue virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *); }; struct GeneratorPrototype : Object |