1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:58:11 +00:00

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
parent 4c732abed5
commit 107e06a396
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;
};