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:
parent
49340f98f7
commit
6ed6434bab
3 changed files with 7 additions and 14 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue