diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-06-25 23:18:33 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-07-03 08:08:35 +0000 |
commit | 61440411a979c7c317bafccfbf5201d969819a06 (patch) | |
tree | 6c5825e21e75587121351bc612a76a7af81ef7be /src/qml/jsruntime/qv4generatorobject.cpp | |
parent | 2aabdd187aae8a953cfcebac8f6c1ba7b19a0727 (diff) |
Prefix vtable methods with virtual
Turns out that the overloading of vtable methods and regular
ones is problematic in some cases. So let's rather make it explicit
which methods are part of the vtable, and which aren't.
Change-Id: Ifee32a26104d30f3c82bca8b5a9cdea2d4f4f526
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4generatorobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4generatorobject.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4generatorobject.cpp b/src/qml/jsruntime/qv4generatorobject.cpp index 1c4c970c2e..d08a6248b8 100644 --- a/src/qml/jsruntime/qv4generatorobject.cpp +++ b/src/qml/jsruntime/qv4generatorobject.cpp @@ -54,7 +54,7 @@ void Heap::GeneratorFunctionCtor::init(QV4::ExecutionContext *scope) Heap::FunctionObject::init(scope, QStringLiteral("GeneratorFunction")); } -ReturnedValue GeneratorFunctionCtor::callAsConstructor(const FunctionObject *f, const Value *argv, int argc) +ReturnedValue GeneratorFunctionCtor::virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc) { ExecutionEngine *engine = f->engine(); @@ -68,9 +68,9 @@ ReturnedValue GeneratorFunctionCtor::callAsConstructor(const FunctionObject *f, } // 15.3.1: This is equivalent to new Function(...) -ReturnedValue GeneratorFunctionCtor::call(const FunctionObject *f, const Value *, const Value *argv, int argc) +ReturnedValue GeneratorFunctionCtor::virtualCall(const FunctionObject *f, const Value *, const Value *argv, int argc) { - return callAsConstructor(f, argv, argc); + return virtualCallAsConstructor(f, argv, argc); } Heap::FunctionObject *GeneratorFunction::create(ExecutionContext *context, Function *function) @@ -84,12 +84,12 @@ Heap::FunctionObject *GeneratorFunction::create(ExecutionContext *context, Funct return g->d(); } -ReturnedValue GeneratorFunction::callAsConstructor(const FunctionObject *f, const Value *, int) +ReturnedValue GeneratorFunction::virtualCallAsConstructor(const FunctionObject *f, const Value *, int) { return f->engine()->throwTypeError(); } -ReturnedValue GeneratorFunction::call(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc) +ReturnedValue GeneratorFunction::virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc) { const GeneratorFunction *gf = static_cast<const GeneratorFunction *>(f); Function *function = gf->function(); |