mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibJS: Convert new_declarative_environment() to NonnullGCPtr
This commit is contained in:
parent
4c732abed5
commit
107e06a396
Notes:
sideshowbarker
2024-07-17 04:10:16 +09:00
Author: https://github.com/linusg
Commit: 107e06a396
Pull-request: https://github.com/SerenityOS/serenity/pull/16521
6 changed files with 16 additions and 16 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue