1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 13:45:06 +00:00

LibJS: Move initialize_instance_elements() from VM to Object

This makes more sense as an Object method rather than living within the
VM class for no good reason. Most of the other 7.3.xx AOs already work
the same way.
Also add spec comments while we're here.
This commit is contained in:
Linus Groh 2022-12-07 00:22:23 +00:00
parent cdeaced54e
commit daec065fde
7 changed files with 25 additions and 16 deletions

View file

@ -231,7 +231,7 @@ ThrowCompletionOr<Object*> ECMAScriptFunctionObject::internal_construct(MarkedVe
ordinary_call_bind_this(callee_context, this_argument);
// b. Let initializeResult be Completion(InitializeInstanceElements(thisArgument, F)).
auto initialize_result = vm.initialize_instance_elements(*this_argument, *this);
auto initialize_result = this_argument->initialize_instance_elements(*this);
// c. If initializeResult is an abrupt completion, then
if (initialize_result.is_throw_completion()) {