LibJS: Rename EnvironmentRecord::parent() => outer_environment()

This name matches the spec (corresponds to the [[OuterEnv]] slot.)
This commit is contained in:
Andreas Kling 2021-06-21 23:35:30 +02:00
commit 5edd259b0a
Notes: sideshowbarker 2024-07-18 11:56:28 +09:00
6 changed files with 30 additions and 29 deletions

View file

@ -231,7 +231,7 @@ Value CallExpression::execute(Interpreter& interpreter, GlobalObject& global_obj
// and subsequently GetThisEnvironment() instead.
auto* function_environment = interpreter.current_environment();
if (!function_environment->current_function())
function_environment = static_cast<DeclarativeEnvironmentRecord*>(function_environment->parent());
function_environment = static_cast<DeclarativeEnvironmentRecord*>(function_environment->outer_environment());
auto* super_constructor = function_environment->current_function()->prototype();
// FIXME: Functions should track their constructor kind.