LibJS: Rename ObjectConstructor::{define_property_ => define_property}

As the non-standard helper define_property is now removed, this doesnt
clash with it anymore.
This commit is contained in:
Idan Horowitz 2021-07-06 19:40:49 +03:00 committed by Linus Groh
parent 148679d1b5
commit 0f91883b17
2 changed files with 3 additions and 3 deletions

View file

@ -33,7 +33,7 @@ void ObjectConstructor::initialize(GlobalObject& global_object)
define_direct_property(vm.names.length, Value(1), Attribute::Configurable);
u8 attr = Attribute::Writable | Attribute::Configurable;
define_native_function(vm.names.defineProperty, define_property_, 3, attr);
define_native_function(vm.names.defineProperty, define_property, 3, attr);
define_native_function(vm.names.defineProperties, define_properties, 2, attr);
define_native_function(vm.names.is, is, 2, attr);
define_native_function(vm.names.getOwnPropertyDescriptor, get_own_property_descriptor, 2, attr);
@ -305,7 +305,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::get_own_property_descriptor)
}
// 20.1.2.4 Object.defineProperty ( O, P, Attributes ), https://tc39.es/ecma262/#sec-object.defineproperty
JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::define_property_)
JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::define_property)
{
if (!vm.argument(0).is_object()) {
vm.throw_exception<TypeError>(global_object, ErrorType::NotAnObject, vm.argument(0).to_string_without_side_effects());

View file

@ -25,7 +25,7 @@ public:
private:
virtual bool has_constructor() const override { return true; }
JS_DECLARE_NATIVE_FUNCTION(define_property_);
JS_DECLARE_NATIVE_FUNCTION(define_property);
JS_DECLARE_NATIVE_FUNCTION(define_properties);
JS_DECLARE_NATIVE_FUNCTION(is);
JS_DECLARE_NATIVE_FUNCTION(get_own_property_descriptor);