mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:58:11 +00:00
LibJS: Remove Interpreter& argument to Function::construct()
This is no longer needed, we can get everything we need from the VM.
This commit is contained in:
parent
340a115dfe
commit
f79d4c7347
36 changed files with 73 additions and 61 deletions
|
@ -54,14 +54,14 @@ Value BoundFunction::call()
|
|||
return m_target_function->call();
|
||||
}
|
||||
|
||||
Value BoundFunction::construct(Interpreter& interpreter, Function& new_target)
|
||||
Value BoundFunction::construct(Function& new_target)
|
||||
{
|
||||
if (auto this_value = vm().this_value(global_object()); m_constructor_prototype && this_value.is_object()) {
|
||||
this_value.as_object().set_prototype(m_constructor_prototype);
|
||||
if (interpreter.exception())
|
||||
if (vm().exception())
|
||||
return {};
|
||||
}
|
||||
return m_target_function->construct(interpreter, new_target);
|
||||
return m_target_function->construct(new_target);
|
||||
}
|
||||
|
||||
LexicalEnvironment* BoundFunction::create_environment()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue