1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 11:57:35 +00:00

LibJS: Remove the default length & attributes from define_native_*

These are usually incorrect, and people sometimes forget to add the
correct values as a result of them being optional, so they should just
be specified explicitly.
This commit is contained in:
Idan Horowitz 2021-07-06 01:12:54 +03:00 committed by Linus Groh
parent a6b8291a9b
commit 53f70e5208
10 changed files with 48 additions and 43 deletions

View file

@ -21,16 +21,17 @@ void ConsoleObject::initialize(GlobalObject& global_object)
{
auto& vm = this->vm();
Object::initialize(global_object);
define_native_function(vm.names.log, log);
define_native_function(vm.names.debug, debug);
define_native_function(vm.names.info, info);
define_native_function(vm.names.warn, warn);
define_native_function(vm.names.error, error);
define_native_function(vm.names.trace, trace);
define_native_function(vm.names.count, count);
define_native_function(vm.names.countReset, count_reset);
define_native_function(vm.names.clear, clear);
define_native_function(vm.names.assert, assert_);
u8 attr = Attribute::Writable | Attribute::Enumerable | Attribute::Configurable;
define_native_function(vm.names.log, log, 0, attr);
define_native_function(vm.names.debug, debug, 0, attr);
define_native_function(vm.names.info, info, 0, attr);
define_native_function(vm.names.warn, warn, 0, attr);
define_native_function(vm.names.error, error, 0, attr);
define_native_function(vm.names.trace, trace, 0, attr);
define_native_function(vm.names.count, count, 0, attr);
define_native_function(vm.names.countReset, count_reset, 0, attr);
define_native_function(vm.names.clear, clear, 0, attr);
define_native_function(vm.names.assert, assert_, 0, attr);
}
ConsoleObject::~ConsoleObject()