static QV4::Value construct(QV4::Managed *m, ExecutionContext *context, QV4::Value *args, int argc)
{
V4V8Function *that = static_cast<V4V8Function*>(m);
- Arguments arguments(args, argc, QV4::Value::undefinedValue(), true, that->m_functionTemplate->m_data.value());
QV4::Object *obj = that->m_functionTemplate->InstanceTemplate()->NewInstance()->v4Value().asObject();
QV4::Value proto = that->Managed::get(context, context->engine->id_prototype);
if (proto.isObject())
obj->prototype = proto.objectValue();
+ Arguments arguments(args, argc, QV4::Value::fromObject(obj), true, that->m_functionTemplate->m_data.value());
+
QV4::Value result = QV4::Value::undefinedValue();
if (that->m_functionTemplate->m_callback)
result = that->m_functionTemplate->m_callback(arguments);