LibJS: Convert new_declarative_environment() to NonnullGCPtr

This commit is contained in:
Linus Groh 2022-12-15 19:59:47 +00:00 committed by Andreas Kling
commit 107e06a396
Notes: sideshowbarker 2024-07-17 04:10:16 +09:00
6 changed files with 16 additions and 16 deletions

View file

@ -414,7 +414,7 @@ ThrowCompletionOr<void> DeleteVariable::execute_impl(Bytecode::Interpreter& inte
ThrowCompletionOr<void> CreateEnvironment::execute_impl(Bytecode::Interpreter& interpreter) const
{
auto make_and_swap_envs = [&](auto*& old_environment) {
Environment* environment = new_declarative_environment(*old_environment);
Environment* environment = new_declarative_environment(*old_environment).ptr();
swap(old_environment, environment);
return environment;
};