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

LibJS: Remove home object from DeclarativeEnvironmentRecord

According to the spec, [[HomeObject]] is an internal slot on function
objects, and should always be accessed through there.
This commit is contained in:
Andreas Kling 2021-06-22 11:40:16 +02:00
parent 49340f98f7
commit 6ed6434bab
3 changed files with 7 additions and 14 deletions

View file

@ -123,7 +123,6 @@ DeclarativeEnvironmentRecord* ScriptFunction::create_environment_record()
}
auto* environment = heap().allocate<DeclarativeEnvironmentRecord>(global_object(), move(variables), m_parent_scope, DeclarativeEnvironmentRecord::EnvironmentRecordType::Function);
environment->set_home_object(home_object());
environment->set_current_function(*this);
if (m_is_arrow_function) {
if (is<DeclarativeEnvironmentRecord>(m_parent_scope))