aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4runtime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index 8b042f12ff..0fd3787730 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -1302,16 +1302,16 @@ ReturnedValue Runtime::method_callWithSpread(ExecutionEngine *engine, const Valu
return static_cast<const FunctionObject &>(function).call(&thisObject, arguments.argv, arguments.argc);
}
-ReturnedValue Runtime::method_construct(ExecutionEngine *engine, const Value &function, const Value &/*newTarget*/, Value *argv, int argc)
+ReturnedValue Runtime::method_construct(ExecutionEngine *engine, const Value &function, const Value &newTarget, Value *argv, int argc)
{
if (!function.isFunctionObject())
return engine->throwTypeError();
Q_ASSERT(function.sameValue(newTarget));
- return static_cast<const FunctionObject &>(function).callAsConstructor(argv, argc);
+ return static_cast<const FunctionObject &>(function).callAsConstructor(argv, argc, &newTarget);
}
-ReturnedValue Runtime::method_constructWithSpread(ExecutionEngine *engine, const Value &function, const Value &/*newTarget*/, Value *argv, int argc)
+ReturnedValue Runtime::method_constructWithSpread(ExecutionEngine *engine, const Value &function, const Value &newTarget, Value *argv, int argc)
{
Q_UNIMPLEMENTED();
if (!function.isFunctionObject())
@@ -1323,7 +1323,7 @@ ReturnedValue Runtime::method_constructWithSpread(ExecutionEngine *engine, const
if (engine->hasException)
return Encode::undefined();
- return static_cast<const FunctionObject &>(function).callAsConstructor(arguments.argv, arguments.argc);
+ return static_cast<const FunctionObject &>(function).callAsConstructor(arguments.argv, arguments.argc, &newTarget);
}
void Runtime::method_throwException(ExecutionEngine *engine, const Value &value)