diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-08-29 14:25:09 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-08-29 18:10:52 +0000 |
commit | b6018a8167b23988542100312b4f2cd126c41700 (patch) | |
tree | 2e55d759b2996f96c1fae84d2abc42ff83030f8c /src/qml/jsruntime/qv4vme_moth.cpp | |
parent | 123f01df338972e2253ae2ab993027755695ceea (diff) |
Initialize this to empty for derived constructors
As per spec, this should be uninitialized in derived
constructors, and the base constructor needs to get
called exactly once.
Change-Id: If31804e58d7ba62efde8fbf6cd852674f8da4495
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4vme_moth.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4vme_moth.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp index 3570453525..fd2328beaa 100644 --- a/src/qml/jsruntime/qv4vme_moth.cpp +++ b/src/qml/jsruntime/qv4vme_moth.cpp @@ -958,12 +958,7 @@ QV4::ReturnedValue VME::interpret(CppStackFrame *frame, ExecutionEngine *engine, MOTH_END_INSTR(ConvertThisToObject) MOTH_BEGIN_INSTR(LoadSuperConstructor) - const FunctionObject *f = stack[CallData::Function].as<FunctionObject>(); - if (!f || !f->isConstructor()) { - engine->throwTypeError(); - } else { - acc = static_cast<const Object *>(f)->getPrototypeOf()->asReturnedValue(); - } + acc = Runtime::method_loadSuperConstructor(engine, stack[CallData::Function]); CHECK_EXCEPTION; MOTH_END_INSTR(LoadSuperConstructor) |