mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +00:00
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.
This commit is contained in:
parent
5de0e0068c
commit
afc86abe24
5 changed files with 25 additions and 25 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue