From b12183789884dbaf69f500bd8ccd8fa2ce722d74 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sun, 13 Jun 2021 20:13:38 +0100 Subject: [PATCH] LibJS: Make Set.prototype.size an accessor Also fix its attributes, should be just configurable. --- Userland/Libraries/LibJS/Runtime/SetPrototype.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Userland/Libraries/LibJS/Runtime/SetPrototype.cpp b/Userland/Libraries/LibJS/Runtime/SetPrototype.cpp index eccf57e796..91a9d82c3d 100644 --- a/Userland/Libraries/LibJS/Runtime/SetPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/SetPrototype.cpp @@ -28,8 +28,7 @@ void SetPrototype::initialize(GlobalObject& global_object) define_native_function(vm.names.forEach, for_each, 1, attr); define_native_function(vm.names.has, has, 1, attr); define_native_function(vm.names.values, values, 0, attr); - - define_native_property(vm.names.size, size_getter, {}, attr); + define_native_accessor(vm.names.size, size_getter, {}, Attribute::Configurable); define_property(vm.names.keys, get(vm.names.values), attr);