LibJS: Make GlobalEnvironmentRecord forward to the right function

This was accidentally deleting a property from the object record object
itself, rather than from the object record.

It's quite confusing that Environment Records are objects, but moving
away from that will require some large changes.
This commit is contained in:
Andreas Kling 2021-06-22 22:18:23 +02:00
parent f7e2994f35
commit 1082e99e08
Notes: sideshowbarker 2024-07-18 11:39:02 +09:00

View file

@ -42,7 +42,7 @@ void GlobalEnvironmentRecord::put_into_environment_record(FlyString const& name,
bool GlobalEnvironmentRecord::delete_from_environment_record(FlyString const& name)
{
// FIXME: This should be a "composite" of the object record and the declarative record.
return object_record().delete_property(name);
return object_record().delete_from_environment_record(name);
}
Value GlobalEnvironmentRecord::get_this_binding(GlobalObject&) const