mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 11:37:16 +02:00
LibJS: Don't call shrink_to_fit() on same environment twice in FDI
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 03:20:18 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/3b6785245f Pull-request: https://github.com/SerenityOS/serenity/pull/22071
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user