mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17:36 +00:00
LibJS: Add define_direct_property and remove the define_property helper
This removes all usages of the non-standard define_property helper method and replaces all it's usages with the specification required alternative or with define_direct_property where appropriate.
This commit is contained in:
parent
e915155ca4
commit
a6b8291a9b
81 changed files with 246 additions and 275 deletions
|
@ -37,7 +37,7 @@ void ProxyConstructor::initialize(GlobalObject& global_object)
|
|||
{
|
||||
auto& vm = this->vm();
|
||||
NativeFunction::initialize(global_object);
|
||||
define_property(vm.names.length, Value(2), Attribute::Configurable);
|
||||
define_direct_property(vm.names.length, Value(2), Attribute::Configurable);
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.revocable, revocable, 2, attr);
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ JS_DEFINE_NATIVE_FUNCTION(ProxyConstructor::revocable)
|
|||
proxy.revoke();
|
||||
return js_undefined();
|
||||
});
|
||||
revoker->define_property(vm.names.length, Value(0), Attribute::Configurable);
|
||||
revoker->define_direct_property(vm.names.length, Value(0), Attribute::Configurable);
|
||||
|
||||
auto* result = Object::create(global_object, global_object.object_prototype());
|
||||
result->create_data_property_or_throw(vm.names.proxy, proxy);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue