summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-04-05 18:04:55 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-05 19:30:30 +0200
commitafc86abe24d39add54ccc642cf6918d4bf626bdd (patch)
tree28d0e26182d46275bd3969ee1d47c745b2660ca8 /Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp
parent5de0e0068c61368d8ee67784340c8049ae4e20a8 (diff)
downloadserenity-afc86abe24d39add54ccc642cf6918d4bf626bdd.zip
LibJS: Remove this_object parameter from get/put own property functions
Specifically: - Object::get_own_properties() - Object::put_own_property() - Object::put_own_property_by_index() These APIs make no sense (and are inconsistent, get_own_property() didn't have this parameter, for example) - and as expected we were always passing in the same object we were calling the method on anyway.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp b/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp
index 4856b6ae21..88793ed56d 100644
--- a/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp
@@ -209,7 +209,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::keys)
if (vm.exception())
return {};
- return obj_arg->get_own_properties(*obj_arg, PropertyKind::Key, true);
+ return obj_arg->get_own_properties(PropertyKind::Key, true);
}
JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::values)
@@ -222,7 +222,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::values)
if (vm.exception())
return {};
- return obj_arg->get_own_properties(*obj_arg, PropertyKind::Value, true);
+ return obj_arg->get_own_properties(PropertyKind::Value, true);
}
JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::entries)
@@ -235,7 +235,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::entries)
if (vm.exception())
return {};
- return obj_arg->get_own_properties(*obj_arg, PropertyKind::KeyAndValue, true);
+ return obj_arg->get_own_properties(PropertyKind::KeyAndValue, true);
}
}