mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibJS: Don't call shrink_to_fit() on same environment twice in FDI
This commit is contained in:
parent
3fc0333ee6
commit
3b6785245f
Notes:
sideshowbarker
2024-07-18 03:20:18 +09:00
Author: https://github.com/awesomekling
Commit: 3b6785245f
Pull-request: https://github.com/SerenityOS/serenity/pull/22071
1 changed files with 1 additions and 1 deletions
|
@ -914,7 +914,7 @@ ThrowCompletionOr<void> ECMAScriptFunctionObject::function_declaration_instantia
|
|||
|
||||
if (is<DeclarativeEnvironment>(*lex_environment))
|
||||
static_cast<DeclarativeEnvironment*>(lex_environment.ptr())->shrink_to_fit();
|
||||
if (is<DeclarativeEnvironment>(*var_environment))
|
||||
if (lex_environment != var_environment && is<DeclarativeEnvironment>(*var_environment))
|
||||
static_cast<DeclarativeEnvironment*>(var_environment.ptr())->shrink_to_fit();
|
||||
|
||||
// 37. Return unused.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue