From 1082e99e08290d21a699ad8b79a4b2027a8139f7 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 22 Jun 2021 22:18:23 +0200 Subject: [PATCH] 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. --- Userland/Libraries/LibJS/Runtime/GlobalEnvironmentRecord.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Runtime/GlobalEnvironmentRecord.cpp b/Userland/Libraries/LibJS/Runtime/GlobalEnvironmentRecord.cpp index cca3f175fa..ab2fcd0dd5 100644 --- a/Userland/Libraries/LibJS/Runtime/GlobalEnvironmentRecord.cpp +++ b/Userland/Libraries/LibJS/Runtime/GlobalEnvironmentRecord.cpp @@ -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