mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 11:37:16 +02:00
LibJS: Clear m_formal_parameters and m_ecmascript_code after compilation
After bytecode compilation, the formal parameters and ecmascript code AST nodes are no longer needed at runtime. Clear these RefPtrs in clear_compile_inputs() to allow the AST subtrees to be freed.
This commit is contained in:
committed by
Andreas Kling
parent
9ea5aa93f8
commit
5e577bec6a
Notes:
github-actions[bot]
2026-02-11 23:00:38 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/5e577bec6a2 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7896
@@ -301,6 +301,8 @@ SharedFunctionInstanceData::~SharedFunctionInstanceData() = default;
|
||||
void SharedFunctionInstanceData::clear_compile_inputs()
|
||||
{
|
||||
VERIFY(m_executable);
|
||||
m_formal_parameters = nullptr;
|
||||
m_ecmascript_code = nullptr;
|
||||
m_functions_to_initialize.clear();
|
||||
m_var_names_to_initialize_binding.clear();
|
||||
m_lexical_bindings.clear();
|
||||
|
||||
Reference in New Issue
Block a user