mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibJS: Add templated overloads for the construct AO to create its MVL
Instead of requiring callers to construct a MarkedValueList, add a variadic templated overload to construct the MVL on the caller's behalf.
This commit is contained in:
parent
4661a0f228
commit
67e02f6ca6
2 changed files with 25 additions and 2 deletions
|
@ -74,7 +74,7 @@ ThrowCompletionOr<Value> call_impl(GlobalObject& global_object, FunctionObject&
|
|||
}
|
||||
|
||||
// 7.3.15 Construct ( F [ , argumentsList [ , newTarget ] ] ), https://tc39.es/ecma262/#sec-construct
|
||||
ThrowCompletionOr<Object*> construct(GlobalObject& global_object, FunctionObject& function, Optional<MarkedValueList> arguments_list, FunctionObject* new_target)
|
||||
ThrowCompletionOr<Object*> construct_impl(GlobalObject& global_object, FunctionObject& function, Optional<MarkedValueList> arguments_list, FunctionObject* new_target)
|
||||
{
|
||||
// 1. If newTarget is not present, set newTarget to F.
|
||||
if (!new_target)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue